Cast id to string before creation, fix #145
This commit is contained in:
parent
bdc646c1d8
commit
47d72ce14e
|
@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue