From ee426b63fc69a34e793b262d2ae6f37ee21864b3 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 4 Oct 2013 12:41:01 -0700 Subject: [PATCH] Reset _ids for rebuild --- lib/model-definition.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/model-definition.js b/lib/model-definition.js index 7a8c3023..3ec785b1 100644 --- a/lib/model-definition.js +++ b/lib/model-definition.js @@ -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;