added custom collection name to mongoose

This commit is contained in:
Jonathan Spies 2012-05-17 22:13:29 -05:00
parent 3179c05b95
commit 75f9373ae5
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ MongooseAdapter.prototype.define = function (descr) {
if (props[key].name === 'Object') props[key] = mongoose.Schema.Types.Mixed; if (props[key].name === 'Object') props[key] = mongoose.Schema.Types.Mixed;
}); });
var schema = new mongoose.Schema(props); var schema = new mongoose.Schema(props);
this._models[descr.model.modelName] = mongoose.model(descr.model.modelName, schema); this._models[descr.model.modelName] = mongoose.model(descr.model.modelName, schema, descr.settings.table || null);
this.cache[descr.model.modelName] = {}; this.cache[descr.model.modelName] = {};
}; };