From 04bda5c13806aa0533891980d92d96cff7854a2d Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 4 Oct 2013 12:54:14 -0700 Subject: [PATCH] Set name and settings --- lib/connector.js | 4 +++- lib/connectors/memory.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/connector.js b/lib/connector.js index 9ebea6af..9587dda0 100644 --- a/lib/connector.js +++ b/lib/connector.js @@ -5,8 +5,10 @@ module.exports = Connector; * methods for connectors than a super class * @constructor */ -function Connector() { +function Connector(name, settings) { this._models = {}; + this.name = name; + this.settings = settings || {}; } /** diff --git a/lib/connectors/memory.js b/lib/connectors/memory.js index 50f73c6a..7af66e29 100644 --- a/lib/connectors/memory.js +++ b/lib/connectors/memory.js @@ -21,13 +21,13 @@ function Memory(m) { this.isTransaction = true; this.cache = m.cache; this.ids = m.ids; - this.constructor.super_.apply(this, [].slice.call(arguments)); + this.constructor.super_.call(this, 'memory'); this._models = m._models; } else { this.isTransaction = false; this.cache = {}; this.ids = {}; - this.constructor.super_.apply(this, [].slice.call(arguments)); + this.constructor.super_.call(this, 'memory'); } }