Operator Difference: "MEMBER OF" vs "IN" in JPA

JPA distinguishes between the MEMBER OF operator, which should be used for checking a collection field, and the IN operator, which should be used for checking other collections, such as a collection that is passed to the query as a parameter.

For example:

'fido' MEMBER OF person.dogs

'fido' IN :dogs

Comments