Fix #283
This commit is contained in:
parent
4abe7f4954
commit
07dbbd4224
|
@ -391,13 +391,13 @@ util.inherits(HasOne, Relation);
|
||||||
* EmbedsOne subclass
|
* EmbedsOne subclass
|
||||||
* @param {RelationDefinition|Object} definition
|
* @param {RelationDefinition|Object} definition
|
||||||
* @param {Object} modelInstance
|
* @param {Object} modelInstance
|
||||||
* @returns {EmbedsMany}
|
* @returns {EmbedsOne}
|
||||||
* @constructor
|
* @constructor
|
||||||
* @class EmbedsOne
|
* @class EmbedsOne
|
||||||
*/
|
*/
|
||||||
function EmbedsOne(definition, modelInstance) {
|
function EmbedsOne(definition, modelInstance) {
|
||||||
if (!(this instanceof EmbedsOne)) {
|
if (!(this instanceof EmbedsOne)) {
|
||||||
return new EmbedsMany(definition, modelInstance);
|
return new EmbedsOne(definition, modelInstance);
|
||||||
}
|
}
|
||||||
assert(definition.type === RelationTypes.embedsOne);
|
assert(definition.type === RelationTypes.embedsOne);
|
||||||
Relation.apply(this, arguments);
|
Relation.apply(this, arguments);
|
||||||
|
|
Loading…
Reference in New Issue