From 366225f07cb8fea3809487e0b38bcf3fa491d621 Mon Sep 17 00:00:00 2001 From: Diogo Resende Date: Thu, 21 Mar 2013 23:49:49 +0000 Subject: [PATCH] Changes singleton uid creation to use driver uid (#86) --- lib/Model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Model.js b/lib/Model.js index f3c3379d..cac2e1d6 100644 --- a/lib/Model.js +++ b/lib/Model.js @@ -150,7 +150,7 @@ function Model(opts) { if (data.length === 0) { return cb(new Error("Not found")); } - Singleton.get(opts.table + "/" + id, { + Singleton.get(opts.driver.uid + "/" + opts.table + "/" + id, { cache : options.cache, save_check : opts.settings.get("instance.cacheSaveCheck") }, function (cb) { @@ -226,7 +226,7 @@ function Model(opts) { merge : merge, offset : options.offset, newInstance: function (data, cb) { - Singleton.get(opts.table + (merge ? "+" + merge.from.table : "") + "/" + data[opts.id], { + Singleton.get(opts.driver.uid + "/" + opts.table + (merge ? "+" + merge.from.table : "") + "/" + data[opts.id], { cache : options.cache, save_check : opts.settings.get("instance.cacheSaveCheck") }, function (cb) {