Merge pull request #155 from strongloop/fix/missing-relation-type

Add "hasOne" to relationTypes
This commit is contained in:
Ritchie Martori 2014-06-27 09:47:45 -07:00
commit 53fd123a19
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ function isModelClass(cls) {
return cls.prototype instanceof ModelBaseClass;
}
DataSource.relationTypes = ['belongsTo', 'hasMany', 'hasAndBelongsToMany'];
DataSource.relationTypes = ['belongsTo', 'hasMany', 'hasAndBelongsToMany', 'hasOne'];
function isModelDataSourceAttached(model) {
return model && (!model.settings.unresolved) && (model.dataSource instanceof DataSource);