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 propertyName = this.definition.keyFrom;
|
||||
var modelInstance = this.modelInstance;
|
||||
inst.__persisted = true;
|
||||
if (this.definition.options.persistent) {
|
||||
var pk = this.definition.keyTo;
|
||||
inst.__persisted = !!inst[pk];
|
||||
} else {
|
||||
inst.__persisted = true;
|
||||
}
|
||||
inst.triggerParent = function(actionName, callback) {
|
||||
if (actionName === 'save' || actionName === 'destroy') {
|
||||
var embeddedList = self.embeddedList();
|
||||
|
|
Loading…
Reference in New Issue