Association ID's vs entire object
CharlieWhite opened this issue · 2 comments
Hey Oliver,
Many thanks for this library, it's amazing.
Is it possible to handle associated ID's rather than full objects?
In my case, I have a few self referential associations that would behave much better with ID's only. For example:
A User has one Manager (also a user).
A User has many Subordinates (also users).
my backend is returning a manager_id and subordinates_ids[] for each user, which I would love to sync with a manager and subordinates relationship on my core data User model.
Any thoughts? Thanks!
Bumping this, any thoughts?
thanks!
SLRESTfulCoreData should resolve associated IDs into already fetched objects. If your User model has a property @property Manager *manager
then SLRESTfulCoreData searches for a manager
or manager_id
attribute in the json object.