I've searched far and wide to find a solution to this problem. All of my attempts result in 0 results. Here is the general data structures:
Core Data Entity A {
stringAttribute string
....
transformableAttribute(NSArray of NSString objects) keywords
}
where keywords = [NSArray arrayWithObjects:@"string 1",@"string 2",@"string 3",nil]
I'm trying to run a predicate to search the NSArray transformable attribute.
I've tried the following against entity A. The core data store is a sqlite store.
NSString *term = @"string 1";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY keywords like[cd] %@", term];
----> Results in 0 matches
NSArray *termArray = [NSArray arrayWithObject:@"string 1"];
NSPredicate *predicate = [NSPredicate predicateWithFormat@"ANY keywords in %@", termArray];
----> Results in 0 matches
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SUBQUERY(keywords, $x, $x like %@).@count > 0", term]
----> Results in an error that a non-relationship cannot be a subquery collection
I've tried some permutations of the above, but still no results. Any advice? Is this possible with Core data?
Thanks!