From 47d72ce14e991f2096616b13b5dc74ea6c94cf2e Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Tue, 6 Nov 2012 19:52:37 +0400 Subject: [PATCH] Cast id to string before creation, fix #145 --- lib/adapters/redis2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adapters/redis2.js b/lib/adapters/redis2.js index 2dd4893d..31d6a479 100644 --- a/lib/adapters/redis2.js +++ b/lib/adapters/redis2.js @@ -268,10 +268,10 @@ BridgeToRedis.prototype.create = function (model, data, callback) { }.bind(this)); function create(id, upsert) { - data.id = id; + data.id = id.toString(); this.save(model, data, function (err) { if (callback) { - callback(err, id); + callback(err, parseInt(id, 10)); } });