-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource collections #39
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # Classes/JSONAPIResourceParser.m # Project/JSONAPITests/JSONAPITests.m
# Conflicts: # Classes/JSONAPIResourceParser.m # Project/JSONAPITests/JSONAPITests.m
# Conflicts: # Project/JSONAPITests/main_example.json
Thank you @tarbrain! I assume this is probably a breaking change to the API then? 😇 (Didn't take a close look yet) |
Yes, the library user would have to change the relationships on their model objects from But then it is possible to lazily load a resource graph by requesting a resource with only a shallow relationship node, and later on you can request the content of the collection by its links. |
@tarbrain Cool cool, thanks! I will keep that in mind. One of my initial thoughts would be to keep the current naming for |
There is an |
@tarbrain Perfect! That is good to know... That may be alright then |
Hey Josh,
we have another PR!
We have modified the data model to map all the properties of a relationship onto a resource collection.
So instead of using an
NSArray
there is now a classJSONAPIResourceCollection
which contains all related resources but also stores links to self and related. It also behaves like anNSArray
(indexed subscripting, enumeration etc).Best regards
Julian Krumow