added custom collection name to mongoose
This commit is contained in:
parent
3179c05b95
commit
75f9373ae5
|
@ -48,7 +48,7 @@ MongooseAdapter.prototype.define = function (descr) {
|
|||
if (props[key].name === 'Object') props[key] = mongoose.Schema.Types.Mixed;
|
||||
});
|
||||
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] = {};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue