Open skotchio opened 10 years ago
It is true that getNestedModel()
and getNestedCollection()
methods only get invoked for first level attributes and this is, at the moment at least, quite intended. It may take you a few more nested custom classes (for ItemCollection
at first level and ItemCollection.model = Item
at second level), but the instantiation of nested values within nested models and collections should IMHO always get delegated to the designated nested model class to keep things consistent and decoupled. If someone has a suggestion how to implement this without breaking the aforementioned conditions, I'd love to help.
Yeah I have just recently run into this issue and it's a massive drawback! I can't have run fetches and sync operations with out explicitly supplying URLs, it's really not ideal. Anyone thinking of working on this?
In the following JSON object:
I can't to override nested collection for 'items' and model for 'items' children: