You should read the Apple Core Programming Guide . To get objects for a specific NSManagedObjectModel , you must use one of the following (this assumes you have an NSManagedObjectModel named objectModel ):
NSArray *myEntities = [objectModel entities]; // Array of all entities in the model
or
NSDictionary *myEntities = [objectModel entitiesByName]; // Dictionary of entities in the model, with the entity names as keys
You can read more at NSManagedObjectModel Class Reference .
It seems you are coming from SQL background (like me). There are a number of concepts in Core Data that differ from each other - sometimes for the better, as soon as you understand them, sometimes it takes more work than a simple SQL statement that you can get used to. I think it’s important to approach Core Data without the SQL “baggage” and treat it as if you are learning to use a database for the first time - this will help to avoid disappointment.
David Ravetti
source share