Core Data NSPredicate fetch on entity relationship using in clause

后端 未结 1 364

I would like to be able to search the relationship of an entity using an IN clause. I have the following setup: \"enter

1条回答
  •  星月不相逢
    2021-01-11 13:20

    You should use the relationship name in your NSPredicate.
    Try this:

    let predicate = NSPredicate(format: "ANY personToNick.nickName in %@", nameArray)
    

    0 讨论(0)
提交回复
热议问题