I have a Building entity and a Floor entity. There is a one-to-many relationship between them.
Building<—->>Floor
Building has an attribute called buildingName. I want to retrieve an NSArray with floor entities according to a certain buildingName.
I have tried different kind of predicates, but I cant get it right.
If you have a Building class with a floor NSSet in it you can simply use:
If not, since floor has only 1 building, you can fetch the Floor entity with a predicate of the building name
(I assume that “building” is the name of the relationship in the Floor entity)