Cast id to string before creation, fix #145

This commit is contained in:
Anatoliy Chakkaev 2012-11-06 19:52:37 +04:00
parent bdc646c1d8
commit 47d72ce14e
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}
});