OliverLetterer/SLRESTfulCoreData — pull request #26 by itsthejb (2014-05-22 16:36:12+00:00)
Title: Parse for fetched properties

Hi Oliver,

Feature suggestion here: in our model we can receive child entities in a number of different ways - the relationships are quite complex and there are a range of endpoints for fetching data in various circumstances. It's not quite your straightforward artists/album/track sort of hierarchy :wink:

As things have been progressing I've been increasingly refactoring direct relationships into fetched properties since this serves our needs better. It eventually got to the point where I started wanting to break up even direct relationships so that the model became even more dynamic.

**TL;DR** *I've added a rough initial implementation of checking for and parsing child entities that are actually accessed through fetched properties in practice. For example, even though you might receive an artist/album/track hierarchy I want the artist->album and album->track relationships to be one-way relationships via fetched properties.*

This isn't too hard to achieve, just consider the fetched properties when parsing relationships, create/fetch the objects as normal and there's also no need to assign the collections (in either direction).

I'm sure you could implement this cleaner and there are probably edge cases I haven't considered since I did this quite quickly in order to keep moving.

In any case, if you think this would be useful as an upstream feature then let's chat about it. :smile:

PS. Keep meaning to respond to a couple of other PRs/issues but have been too busy. Soon, hopefully!

Thanks