Pass options into scope

This commit is contained in:
Raymond Feng 2014-08-08 09:25:49 -07:00
parent 7fe7bf9b9a
commit 3d5ec63c99
1 changed files with 3 additions and 3 deletions

View File

@ -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
};