|Dec 19, 2009, 04:12 AM||#1|
Using NSPredicate to query a Core Data to-many relationship
I am trying to use NSPredicate to query a CoreData to-many relationship, but it errors, as it is calling it on the NSMutableSet, and not the objects themselves.
My "item" has a to-many relationship called "tags" and each tag has a name property which is an NSString.
Im trying to create an NSPredicate that sees if ANY of the Tag's name property, matches a given string.
I have tried using "ANY tags.name MATCHES[c] %@" but I get the error
[<_NSFaultingMutableSet 0x1005708f0> addObserver:forKeyPathptions:context:] is not supported. Key path: name
Any ideas are greatly appreciated, as Im a bit stuck.
|Dec 19, 2009, 05:19 AM||#3|
NSPredicate does the quotes for me
It seems if I do it in code using an NSFetchRequest it works, but if I set the filter predicate on a NSArrayController it fails.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Core data relationship||cpuin||Mac Programming||0||Oct 14, 2013 03:55 PM|
|Core Data One to Many Relationship||zyzz12||iOS 6||0||Jul 30, 2013 12:14 PM|
|Core data relationship fault : null key||ramy1989||Mac Programming||0||Nov 7, 2012 03:19 PM|
|How to select NSNumber data with NSPredicate??||mikezang||iPhone/iPad Programming||0||Oct 17, 2012 09:39 AM|
|How to create a core data with more than 1 table with relationship?||kimbebot||iPhone/iPad Programming||3||Jul 31, 2012 02:42 AM|
All times are GMT -5. The time now is 03:59 PM.