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
You can use something like this:
SELECT s FROM Setting s INNER JOIN s.languages c WHERE c = :code
More examples was here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With