I have a request like this :
NSPredicate *predicate = [NSPredicate predicateWithFormat:@\"ANY attributes.attribute.attributeId IN %@\", attributeIds];
NSPredicate *objectsThatContainsAtLeastAllAttributesInList =
[NSPredicate predicateWithFormat:
@"SUBQUERY(attributes, $s, $s.attribute.attributeId IN %@).@count == %d", attributeIds, [attributeIds count]];
NSPredicate *objectsWhoseAttributesAreInList =
[NSPredicate predicateWithFormat:
@"attributes.@count == %d AND SUBQUERY(attributes, $s, $s.attributes.id IN %@).@count == %d", [attributeIds count], attributeIds, [attributeIds count]];