emberjs/data — pull request #1633 by emk (2014-01-07 23:15:53+00:00)
Title: Extract embedded belongsTo relationships in DS.EmbeddedRecordsMixin

DS.EmbeddedRecordsMixin handles embedded hasMany relationships, but not embedded belongsTo relationships. This patch attempts implements nested belongsTo extraction, with full unit tests, but not the corresponding serialization primitives.

Use case: I'm dealing with a project that has an array of values, each of which contains an embedded array, each value in which contains another embedded belongsTo value, which in turns contains another embedded array. DS.EmbeddedRecordsMixin _almost_ handles this, but it breaks on the embedded belongsTo value.

It would be nice to implement the corresponding serialization support, for the sake of completeness, but I don't know whether anybody would use it.

Please let me know if I can improve this patch in any way. Thank you for all your work on Ember Data!