Fix to handle new isNewRecord implementation
This commit is contained in:
parent
3655107334
commit
7f155966ab
|
@ -2020,7 +2020,12 @@ EmbedsMany.prototype.prepareEmbeddedInstance = function(inst) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var propertyName = this.definition.keyFrom;
|
var propertyName = this.definition.keyFrom;
|
||||||
var modelInstance = this.modelInstance;
|
var modelInstance = this.modelInstance;
|
||||||
|
if (this.definition.options.persistent) {
|
||||||
|
var pk = this.definition.keyTo;
|
||||||
|
inst.__persisted = !!inst[pk];
|
||||||
|
} else {
|
||||||
inst.__persisted = true;
|
inst.__persisted = true;
|
||||||
|
}
|
||||||
inst.triggerParent = function(actionName, callback) {
|
inst.triggerParent = function(actionName, callback) {
|
||||||
if (actionName === 'save' || actionName === 'destroy') {
|
if (actionName === 'save' || actionName === 'destroy') {
|
||||||
var embeddedList = self.embeddedList();
|
var embeddedList = self.embeddedList();
|
||||||
|
|
Loading…
Reference in New Issue