What is wrong in my nested SUBQUERY predicate?

2020-03-03 05:13发布

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

1条回答
甜甜的少女心
2楼-- · 2020-03-03 05:29

Ok, so here is the working solution:

[NSPredicate predicateWithFormat:@"SUBQUERY(bs, $B, SUBQUERY($B.cs, $C, $C.ds.name != \"xxx\").@count > 0).@count > 0"];
查看更多
登录 后发表回答