I have three entities: EntityA, EntityB and EntityC connected with to-many relationships.
See schema for details:
alt text http://img706.imageshack.us/img706
My final solution is to use SUBQUERY.
NSPredicate *p = [NSpredicate predicateWithFormat:@"(name like %@) AND (0 != SUBQUERY(entitiesB, $x, (0 != SUBQUERY($x.entitiesC, $y, $y.name like %@).@count)).@count)", nameA, nameC];
Unfortunately I was unable to expand this query on nsExpression objects.