Core Data, NSPredicate and to-many key

后端 未结 4 1241
别跟我提以往
别跟我提以往 2020-12-08 06:45

I have a Core Data model in which a Task entity includes an optional to-many relationship excludedOccurrences. One of the properties of excludedOccurrences is start, which i

4条回答
  •  一整个雨季
    2020-12-08 07:16

    So, to test for a non-empty relationship, this actually works:

    [NSPredicate predicateWithFormat:@"relationship.@count != 0"]
    

    The solution given by Ashley Clark crashes for me giving "to-many key not allowed here"

提交回复
热议问题