This commit is contained in:
Fabien Franzen 2014-09-04 15:37:48 +02:00
parent 4abe7f4954
commit 07dbbd4224
1 changed files with 2 additions and 2 deletions

View File

@ -391,13 +391,13 @@ util.inherits(HasOne, Relation);
* EmbedsOne subclass
* @param {RelationDefinition|Object} definition
* @param {Object} modelInstance
* @returns {EmbedsMany}
* @returns {EmbedsOne}
* @constructor
* @class EmbedsOne
*/
function EmbedsOne(definition, modelInstance) {
if (!(this instanceof EmbedsOne)) {
return new EmbedsMany(definition, modelInstance);
return new EmbedsOne(definition, modelInstance);
}
assert(definition.type === RelationTypes.embedsOne);
Relation.apply(this, arguments);