|Dec 19, 2009, 05: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, 06: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 one-to-many relationship questions: Efficient techniques?||Soulstorm||Mac Programming||0||Aug 9, 2011 07:57 AM|
|core data binding not working||Javajax||Mac Programming||3||Jul 10, 2011 02:23 PM|
|Resolved: Struggling with Core Data: Part 2||RonC||iPhone/iPad Programming||2||May 27, 2011 02:02 PM|
|Help Needed - Xcode 4 Options: Use Core Data Include Unit Tests||Mitch1984||iPhone/iPad Programming||3||Feb 26, 2011 04:42 PM|
|Core Data retrieve relationships||Hackmodford||iPhone/iPad Programming||2||Oct 13, 2010 02:02 PM|
All times are GMT -5. The time now is 08:17 AM.