Right now I am able to fetch all the Words for the Entity " Location" with no problem.
But what I need is to be able todo is to fetch all words that are associated with "story_id: 149" I have only listed 3 Events for locations
var story_id = "149"
So the rule that I would need tobe able to extract all the keywords for story_id.
Location / Location.story_id / Location.keyword
Thank you ahead of time for all help to my needs.
init() {
locations = FetchRequest<Location>(entity: Location.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \Location.event, ascending: true)])
}
Here is my relationship graph
{
"keyword": "Boston",
"location_id": "6282",
"story_id": "3207",
"event": "Canada3"
},
"keyword": "Boston",
"location_id": "6282",
"story_id": "149",
"event": "Burbank On Parade"
},
{
"keyword": "Burbank",
"location_id": "6277",
"story_id": "149",
"event": "Burbank On Parade"
},
{
"keyword": "Miami",
"location_id": "6283",
"story_id": "3213",
"event": "Canada2"
}