OliverLetterer / SLRESTfulCoreData

Objc naming conventions, autogenerated accessors at runtime, URL substitutions and intelligent attribute mapping
MIT License
178 stars 13 forks source link

Does it return the completionBlock without filling the relationships? #21

Closed akashkamboj closed 10 years ago

akashkamboj commented 10 years ago

Hey first of all nice Repository. I have a few questions/concerns.

  1. Regarding completionHandler. Does it execute the completionHandlerBlock without filling all the relationships?
  2. I noticed that deleteEveryOtherObject is by default true. So let's say my application has 5 tabs. All of those are showing posts with different filters. And I pull to refresh in first tab. Will it delete all the posts from Database? All 5 posts listings are separate relationships BTW.
OliverLetterer commented 10 years ago

Thanks.

  1. If you are using -[NSManagedObject fetchObjectsForRelationship:fromURL:completionHandler:] or any other API build on top of that, the array in the completionHandler returns all objects returned by your servers API.
  2. -[NSManagedObject fetchObjectsForRelationship:fromURL:completionHandler:] deletes every other object of this relationship. So if each tab is using a different relationship of some parent object, the other relationships should not be affected.