sproutcore/sproutcore — pull request #1104 by mauritslamers (2013-09-29 11:09:38+00:00)
Title: New nested record implementation

A new nested record implementation which does away with the needless splitting up of nested records. Tests are included.

Main differences:
- where originally the store had the task of keeping track of parent and child records, this is now taken over by SC.Record. From the perspective of the store a nested record becomes a normal record.
- Changes bubble up from inside: a change inside the nested records bubbles up to the main record and gets written to the store there.
- No search possible for child records in the store.

Areas still to discuss:
- When the store changes the order of hashes in a nested array, the records will change to reflect the changes, as the record objects retrieve their attributes based on the position in the child array. I am not sure this is a desirable behaviour, but the only solution to fix it it that the nested records keep a cache of their hash to compare to when things change from the store. It would then have to be an item-per-item compare, as references are unlikely to be the same.