Reset _ids for rebuild

This commit is contained in:
Raymond Feng 2013-10-04 12:41:01 -07:00
parent 1ae9478496
commit ee426b63fc
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,7 @@ ModelDefinition.prototype.idName = function() {
var id = this.ids()[0];
if(this.properties.id && this.properties.id.id) {
return 'id';
}
} else {}
return id && id.name;
};
@ -256,6 +256,7 @@ ModelDefinition.prototype.build = function (forceRebuild) {
if(forceRebuild) {
this.properties = null;
this.associations = [];
this._ids = null;
}
if (this.properties) {
return this.properties;