make markModified smart about children #435

Closed
aheckmann opened this Issue Jul 28, 2011 · 1 comment

Projects

None yet

1 participant

@aheckmann

Right now markModified isnt smart about children that are marked modified so we get a "conflicting mods in update" error:

var schema = new Schema({
   name: {
       first: String
     , last: String
  }
});

var Person = db.model('Person', schema);
var person = new Person({ name: { first: 'bat', last: 'man' }});
person.name.last = 'woman';
delete person.name.first;
person.markModified('name'); 
person.save(); // "conflicting mods in update" error
@aheckmann

can't reproduce anymore

@aheckmann aheckmann closed this Oct 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment