修正config默认类型导致的后续dbName配置不生效的问题

默认值设置为了字符串 导致后面config使用出现不生效
This commit is contained in:
Rayi 2015-03-17 17:48:33 +08:00
parent 8c09bcb25b
commit 776cfcd2d4

View File

@ -94,7 +94,7 @@ var Model = module.exports = Class(function(){
if (isString(config)) {
config = {db_prefix: config};
}
this.config = config || '';
this.config = config || {};
//如果Model设置了实际数据库名则需要将数据库名进行设置
if(this.dbName) {