icereval/backbone-documentmodel

Propagate change event

Closed this issue · 1 comments

I don't understand the reasoning for not propagating the change event from subdocuments. If I understand correctly, part of the design purpose of this plugin is to allow people work with an entire document at a time easily, but this seems to go against the grain of that. When loading one would pass an entire document to the constructor and when saving one would use toJSON() to retrieve the entire document. It would also be very helpful to get a change notification for the entire document.

I understand it would be difficult to differentiate between changes in the root node and changes in subdocuments, but the point of the project was to smooth over the fact that there are subdocuments. If this is a problem, however, a possible solution is to convert the subdocument change events into something else, like childChange or something.

Duplicates #9, investigating the pull request.