I have one managedobject class Metrics, which has an attribute metricType. metricType is another managedobject MetricType.
I want to fetch all Metrics that have a particular MetricType. Metric type just has one attribute, name.
So my question is, what is the best way to write the predicate to filter on an object?
Thanks
You would chain together the keys for the attribute you wish to filter on. For instance
[NSPredicate predicateWithFormat:@"metricType.name LIKE %@",stringToSearchFor,nil].