SUBQUERY in NSPredicate and NSInvalidArgumentException

前端 未结 2 704
孤独总比滥情好
孤独总比滥情好 2020-12-19 10:33

I set up the following model in Core Data.

Book has a to-many relationship, called toBookOrders, with OrderBook entity. The inverse is called toBook.
Book ha         


        
2条回答
  •  [愿得一人]
    2020-12-19 11:12

    Separate the isSync == 0 and SUBQUERY into separate NSPredicates, add them to an NSArray then use [NSCompoundPredicate andPredicateWithSubpredicates:array] to get them joined into a single one to pass to your NSFetchSpecification.

提交回复
热议问题