I have 3 entities: Topic, Group and Word. Topic has a one-to-many relation with Group, and Group has a one-to-many relation with Word. From a list of words, I want to get the ones that belong to certain topic. That means, getting the group of the word and then the topic of the word. For a Word fetch request, I have NSPredicate(format: "group.topic = %@", topic). Where topic is the object I want to match word to. But this isn't working so I guess it isn't the right way of doing it. Does someone know how something like this could be done?
In coredata and swiftUI, how can I get the objects that are related to an object that is related to the object I have
Read and study everything here: https://developer.apple.com/documentation/coredata and here https://developer.apple.com/documentation/swiftui/loading_and_displaying_a_large_data_feed