Q:

JPQL check if collection member has attribute with required value

I have entity (e.g. Setting) which contains collection (e.g. Settings.languages) with another objects (instances of Language).
Is there way how to select all entities which contains in its collection entity with required attribute value? e.g. get all Settings which Settings.languages contains Language.code = 'EN' ?
Something like:
 SELECT s FROM Setting s WHERE :code MEMBER OF s.languages.code

A:

You can use something like this:
SELECT s FROM Setting s INNER JOIN s.languages c WHERE c = :code

More examples was here

