Pass options into scope
This commit is contained in:
parent
7fe7bf9b9a
commit
3d5ec63c99
|
@ -553,7 +553,7 @@ RelationDefinition.hasMany = function hasMany(modelFrom, modelTo, params) {
|
|||
}
|
||||
|
||||
return filter;
|
||||
}, scopeMethods);
|
||||
}, scopeMethods, definition.options);
|
||||
|
||||
};
|
||||
|
||||
|
@ -1600,7 +1600,7 @@ RelationDefinition.embedsMany = function embedsMany(modelFrom, modelTo, params)
|
|||
// Mix the property and scoped methods into the prototype class
|
||||
var scopeDefinition = defineScope(modelFrom.prototype, modelTo, accessorName, function () {
|
||||
return {};
|
||||
}, scopeMethods);
|
||||
}, scopeMethods, definition.options);
|
||||
|
||||
scopeDefinition.related = scopeMethods.related;
|
||||
};
|
||||
|
@ -2014,7 +2014,7 @@ RelationDefinition.referencesMany = function referencesMany(modelFrom, modelTo,
|
|||
// Mix the property and scoped methods into the prototype class
|
||||
var scopeDefinition = defineScope(modelFrom.prototype, modelTo, relationName, function () {
|
||||
return {};
|
||||
}, scopeMethods);
|
||||
}, scopeMethods, definition.options);
|
||||
|
||||
scopeDefinition.related = scopeMethods.related; // bound to definition
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue