diff --git a/lib/model-builder.js b/lib/model-builder.js index 99a68f3b..9a935702 100644 --- a/lib/model-builder.js +++ b/lib/model-builder.js @@ -107,7 +107,9 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett // Check if there is a unresolved model with the same name var ModelClass = this.models[className]; - if(!ModelClass) { + // Create the ModelClass if it doesn't exist or it's resolved (override) + // TODO: [rfeng] We need to decide what names to use for built-in models such as User. + if(!ModelClass || !ModelClass.settings.unresolved) { // every class can receive hash of data as optional param ModelClass = function ModelConstructor(data, dataSource) { if(!(this instanceof ModelConstructor)) {