From 776cfcd2d494247c3ca640ce71ea87578055092d Mon Sep 17 00:00:00 2001 From: Rayi Date: Tue, 17 Mar 2015 17:48:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3config=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AF=BC=E8=87=B4=E7=9A=84=E5=90=8E=E7=BB=AD?= =?UTF-8?q?dbName=E9=85=8D=E7=BD=AE=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 默认值设置为了字符串 导致后面config使用出现不生效 --- lib/Lib/Core/Model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lib/Core/Model.js b/lib/Lib/Core/Model.js index 1c25e43c..14d1ead6 100644 --- a/lib/Lib/Core/Model.js +++ b/lib/Lib/Core/Model.js @@ -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) {