Fix HEAD on relation hasMany
This commit is contained in:
parent
1b001eedd3
commit
04a56e2ea6
|
@ -397,6 +397,9 @@ RelationDefinition.hasMany = function hasMany(modelFrom, modelTo, params) {
|
|||
var updateByIdFunc = scopeMethods.updateById;
|
||||
modelFrom.prototype['__updateById__' + relationName] = updateByIdFunc;
|
||||
|
||||
var existsByIdFunc = scopeMethods.exists;
|
||||
modelFrom.prototype['__exists__' + relationName] = existsByIdFunc;
|
||||
|
||||
if(definition.modelThrough) {
|
||||
scopeMethods.create = scopeMethod(definition, 'create');
|
||||
scopeMethods.add = scopeMethod(definition, 'add');
|
||||
|
|
Loading…
Reference in New Issue