¡@

Home 

2014/10/15 ¤U¤È 10:08:34

iphone Programming Glossary: excludedoccurrences

Core Data, NSPredicate and to-many key

http://stackoverflow.com/questions/1164338/core-data-nspredicate-and-to-many-key

NSPredicate and to many key 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 is an NSDate object. The ExcludedOccurrence entity has an inverse.. model in which a Task entity includes an optional to many relationship excludedOccurrences. One of the properties of excludedOccurrences is start which is an NSDate object. The ExcludedOccurrence entity has an inverse mandatory to one relationship to the Task.. I am trying to use is therefore NSPredicate occurrenceIsNotExcludedPredicate NSPredicate predicateWithFormat @ ALL excludedOccurrences.start @ today where today is a NSDate object for today including only the day month and year components. All of the excluded..

How to correctly setup a NSPredicate for a to-many relationship when using Core Data?

http://stackoverflow.com/questions/1347776/how-to-correctly-setup-a-nspredicate-for-a-to-many-relationship-when-using-core

inconsistent documentation. The correct predicate in this case is the following one NSPredicate predicateWithFormat @ excludedOccurrences.@count 0 OR 0 SUBQUERY excludedOccurrences sub sub.day @ .@count today In the predicate a subquery is used to test if the.. in this case is the following one NSPredicate predicateWithFormat @ excludedOccurrences.@count 0 OR 0 SUBQUERY excludedOccurrences sub sub.day @ .@count today In the predicate a subquery is used to test if the number of related excludedOccurrences with.. excludedOccurrences sub sub.day @ .@count today In the predicate a subquery is used to test if the number of related excludedOccurrences with a date matching your test date is equal to zero. However the documentation is misleading. Here is what the Predicate..