In my data model, I have:
Activity(name, sponsor, Location*) // one activity may have many Locations
Location(name, street, suburb, state, postcode)
And I need a way to get activities with specified location name, for example, user wants to know all activities in “ICT Building”, so how do I construct the predicate for the query?
Something like:
"Location.name == ICT Building" ?
Thanks!
Use this where
managedObjectContextis your context:This will return an array with managed objects where the name is ICT Building.