Fix the test failure for mongodb
This commit is contained in:
parent
e888b8cff9
commit
7a9b64f1bf
|
@ -1901,7 +1901,7 @@ RelationDefinition.referencesMany = function referencesMany(modelFrom, modelTo,
|
|||
var relationName = params.as || i8n.camelize(modelTo.pluralModelName, true);
|
||||
var fk = params.foreignKey || i8n.camelize(modelTo.modelName + '_ids', true);
|
||||
var idName = modelTo.dataSource.idName(modelTo.modelName) || 'id';
|
||||
var idType = modelTo.getPropertyType(idName);
|
||||
var idType = modelTo.definition.properties[idName].type;
|
||||
|
||||
var definition = modelFrom.relations[relationName] = new RelationDefinition({
|
||||
name: relationName,
|
||||
|
|
|
@ -1663,7 +1663,7 @@ describe('relations', function () {
|
|||
cat.links.should.have.length(1);
|
||||
cat.items.add(product3, function(err, link) {
|
||||
link.should.be.instanceof(Link);
|
||||
link.id.should.equal(product3.id);
|
||||
link.id.should.eql(product3.id);
|
||||
link.name.should.equal('Product 3');
|
||||
|
||||
cat.links.should.have.length(2);
|
||||
|
|
Loading…
Reference in New Issue