I have two entities, Parent and Child. The Parent entity has a to-many relationship to Child named "children." Child has a String attribute named "childName."
I want to make a fetched property on Parent, let's call it "specialChild" that returns a Child with a particular name, let's say "Special". The following predicates return an empty set when I access the fetched property:
- children.childName == "Special"
- SUBQUERY(children, $eachChild, $eachChild.childName = "Special").@count > 0
- SUBQUERY(children, $eachChild, ANY $eachChild.childName = "Special").@count > 0
I believe I'm messing up the predicate somehow, because I'm still pretty inexperienced with them. (and I can find zero documentation from Apple on "SUBQUERY") How am I supposed to specify "the child whose childName is Special" in the Parent's fetched property predicate?
Yes, I am calling -refreshObject:mergeChanges: but I still receive an empty result. Yes, the destination entity is Child.