Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

docs; fix toJSON example

closes #1137
  • Loading branch information...
commit 215253eeac6455290a426508d3a93fc55b0fa350 1 parent 733c9ca
@aheckmann aheckmann authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/guide.jade
View
2  docs/guide.jade
@@ -393,7 +393,7 @@ block content
schema.path('name').get(function (v) {
return v + ' is my name';
});
- schema.set('toJSON', { getters: true });
+ schema.set('toJSON', { getters: true, virtuals: false });
var M = mongoose.model('Person', schema);
var m = new M({ name: 'Max Headroom' });
console.log(m.toObject()); // { _id: 504e0cd7dd992d9be2f20b6f, name: 'Max Headroom' }

0 comments on commit 215253e

Please sign in to comment.
Something went wrong with that request. Please try again.