我有以下NSManagedObjects
Product <<->> ProductAttribute <->> ProductAttributeOption根据产品使用NSPredicate获取ProductAttributeOption的正确方式是什么?
我尝试过以下几种方法,但没有成功:
[NSPredicate predicateWithFormat:@"ANY SELF.productAttribute.products MATCHES %@", product]
[NSPredicate predicateWithFormat:@"ANY SELF.productAttribute@distinctUnionOfSets.products MATCHES %@"", product]
[NSPredicate predicateWithFormat:@"ANY SELF.productAttribute.@distinctUnionOfSets.giftProducts LIKE[cd] %@", self.giftProduct]有什么建议吗?谢谢!
发布于 2012-10-21 17:52:14
下面的谓词应该起作用:
[NSPredicate predicateWithFormat:@"ANY productAttribute.products = %@", product];https://stackoverflow.com/questions/12993275
复制相似问题