JPA “contains one of”
问题 I'm writing a Dao to fetch all Messages relevant to a Person . But I can't find the correct JPQL syntax. In my model: a Person has multiple Roles (I pass these into the query as a parameter: Set of enum values). a Message is relevant to multiple Roles . So I want to find all messages relevant to a person: SELECT m FROM Message m WHERE m.roles [contains one of] :userRoles Giving it :userRoles as a Set<Role> parameter. What is the correct syntax for that missing [contains one of] section? I've