Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is wrong in my nested SUBQUERY predicate?

I have the data model you can see below, and a nested SUBQUERY predicate, but in somehow it just not works. Any idea how to correct it?

I figured out, this here down is working finally:

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

enter image description here

like image 278
János Avatar asked Nov 05 '12 23:11

János


1 Answers

Ok, so here is the working solution:

[NSPredicate predicateWithFormat:@"SUBQUERY(bs, $B, SUBQUERY($B.cs, $C, $C.ds.name != \"xxx\").@count > 0).@count > 0"];
like image 130
János Avatar answered Oct 20 '22 21:10

János