i have some attributes in my core data entity like
- name
- age
- address
but here address is one NSDictionay(contains city, state, zip etc). now i want to search the data in that entity.
this is the code i am using
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(name CONTAINS[cd] $string) OR (age CONTAINS[cd] $string) OR (address.city CONTAINS[cd] $string) OR (address.state CONTAINS[cd] $string) OR (address.streetOne CONTAINS[cd] $string) OR (address.zip CONTAINS[cd] $string) OR (address.county CONTAINS[cd] $string)"];
but i am getting error because of NSDictionary elements. please tell me what is the exact search Query to Use when the Entity attributes contains Dictionary along with other attributes..?