These are chat archives for vdemedes/mongorito

Mar 2015
Rodrigo Espinosa
Mar 13 2015 01:34
Hello everybody! Vadim, cheers for a such a great project, I was looking at the code today and it's super clean, really like it!
I think what @moliveraf was trying to said is that, in order to know if the new model instance comes from a .find, the constructor needs to check if the _id property is defined.
Rodrigo Espinosa
Mar 13 2015 01:42
So, lets see, @moliveraf is proposing that the this.set(attrs) should be called from the constructor when the model instance is absolutely new and hasn't been saved yet, is that right @moliveraf ?
This new behaviour is for populating the changed object before saving the instance.
In that way, when I create a new model instance, every attribute will be flagged as changed until I save.
Matías Olivera
Mar 13 2015 01:43
That’s exactly what I want @RodrigoEspinosa