Permalink
Browse files

Fixes customId for mongodb

  • Loading branch information...
1 parent 29aa10f commit 4345d22fe6aec5722a9b221807b9ba86b0b9e173 @MiguelMadero MiguelMadero committed Apr 26, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/adapters/mongo/index.js
@@ -283,8 +283,7 @@ utils.mixin(Adapter.prototype, new (function () {
insert = function () {
var item;
if ((item = items.shift())) {
- id = utils.string.uuid();
-
+ id = item.id || utils.string.uuid();
item.id = id;
item = item.toData({whitelist: ['id', 'createdAt']});

0 comments on commit 4345d22

Please sign in to comment.