Skip to content

Commit

Permalink
fixed; only save the depopulated ObjectId
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Aug 29, 2011
1 parent a820d98 commit 773f737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/array.js
Expand Up @@ -303,7 +303,7 @@ MongooseArray.prototype.splice = function () {
MongooseArray.prototype.toObject = function (options) {
if (options && options.depopulate && this[0] instanceof Document) {
return this.map(function (doc) {
return doc.toObject(options);
return doc._id;
});
}

Expand Down

0 comments on commit 773f737

Please sign in to comment.