I am trying to understand Core Data and it is slow progress but I am slowly getting there. One thing that is puzzling me is how to create a Fetched Request in the data model editor that pulls records with the criteria from across a relationship.
e.g. I have two entities “Main Category” and “Sub Category” which has a one to many relationship.
I can’t see how I can create a Fetched Request in the editor to select Sub Categories that match “SOME_SUB” whos main category is “SOME_MAIN”. in SQL this is trivial but I am banging my head here.
I can see the apple documentation that shows how to create a Fetched Request via code here https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdFetching.html but I want to keep the Fetched Requests in the data model view instead.
Any hints?
Thanks
When viewing your data model, select the entity you want to create the fetch request for. Select the “Editor” menu item from the menu bar -> Add Fetch Request.