What is wrong with my SUBQUERY nested predicate?

I have a data model, which you can see below, and a nested SUBQUERY predicate, but in a sense this just doesn't work. Any idea how to fix this?

I realized what works here below:

[NSPredicate predicateWithFormat:@"SUBQUERY(bs, $B, SUBQUERY($B.cs, $C, $C.ds.name != \"xxx\") .@count > 0) .@count > 0"]; 

enter image description here

+5
source share
1 answer

So here is a working solution:

 [NSPredicate predicateWithFormat:@"SUBQUERY(bs, $B, SUBQUERY($B.cs, $C, $C.ds.name != \"xxx\") .@count > 0) .@count > 0"]; 
+3
source

All Articles