models/change: fix `id` property definition

Remove the flag `generated:true`, as it does not work together with
a custom `setter.id` function.
This commit is contained in:
Miroslav Bajtoš 2014-10-10 19:10:42 +02:00
parent 223fa7a442
commit 846a0b0074
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ var PersistedModel = require('./persisted-model')
*/ */
var properties = { var properties = {
id: {type: String, generated: true, id: true}, id: {type: String, id: true},
rev: {type: String}, rev: {type: String},
prev: {type: String}, prev: {type: String},
checkpoint: {type: Number}, checkpoint: {type: Number},

View File

@ -84,6 +84,7 @@ describe('Change', function(){
it('should create an entry', function (done) { it('should create an entry', function (done) {
var test = this; var test = this;
Change.findById(this.result.id, function(err, change) { Change.findById(this.result.id, function(err, change) {
if (err) return done(err);
assert.equal(change.id, test.result.id); assert.equal(change.id, test.result.id);
done(); done();
}); });