Skip to content

Commit

Permalink
casing
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed May 11, 2011
1 parent 825680f commit d850866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/mongoose/schema.js
Expand Up @@ -40,13 +40,13 @@ function Schema (obj, options) {
if (!this.paths['_id']) if (!this.paths['_id'])
this.add({ _id: {type: ObjectId, auto: true} }); this.add({ _id: {type: ObjectId, auto: true} });


if (!this.paths['id'] && !this.options.novirtualid) { if (!this.paths['id'] && !this.options.noVirtualId) {
this.virtual('id').get(function () { this.virtual('id').get(function () {
return this._id.toString(); return this._id.toString();
}); });
} }


delete this.options.novirtualid; delete this.options.noVirtualId;
}; };


/** /**
Expand Down
2 changes: 1 addition & 1 deletion test/schema.test.js
Expand Up @@ -771,7 +771,7 @@ module.exports = {
}, },


'allow disabling the auto .id virtual': function () { 'allow disabling the auto .id virtual': function () {
var schema = new Schema({ name: String }, { novirtualid: true }); var schema = new Schema({ name: String }, { noVirtualId: true });
should.strictEqual(undefined, schema.virtuals.id); should.strictEqual(undefined, schema.virtuals.id);
} }


Expand Down

0 comments on commit d850866

Please sign in to comment.