I’m new to IPhone development and I’m currently trying my hand at Core Data. I have a couple of entities that I’ve defined in my model. In one entity I have a fetched property. When I generate the Objective-C source files from my model, my entity that I defined with the fetched property does not have a property defined for the fetched property. Why? How do I access the fetched property?
More details in response to Tim:
- I have an entity named
Libraryand another entity namedBook. Libraryhas a one to many relationship toBook(Bookalso has an inverse relationship).Bookhas a BOOL property calledisCheckedOut.- I defined a fetched property on
LibrarycalledfetchAllCheckedOutBooks. The destination entity isBookand the predicate isisCheckedOut == 1.
Have you tried using valueForKey: and passing in the name of your fetched property? That’s how I would expect it to work. I would also expect that it would return an NSSet object, but that’s easily verified by doing this: