I have recently been looking at Core Data for the iPhone and I have one query which I have not been able to find an answer to in the literature.
Lets imagine that I have a User model object with a to-many relationship with a Purchase object. A User may have thousands of purchases.
All of the information I have seen thus far seems to suggest that a fetch operation carried out across that relationship would return an NSSet with all of the Purchase objects associated with a particular User.
Clearly I would prefer if there was some way to limit the number of Purchase objects fetched by:
1) imposing some sort of criteria (e.g. only purchases over £1000 etc.); or
2) only fetching in batches if the above is not possible.
Is the above possible? I am just concerned that with the limited memory of the iPhone that I risk overloading it with thousands of unnecessarily fetched objects.
Thanks in advance for any replies.