Criteria API - Using UPPER in a ElementCollection
问题 I have a class @Entity public class Person{ ... @ElementCollection private Set<String> tags; ... } I want to use the JPA 2.0 Criteria API to search over these tags - but in a case insensitive way. Thus I want to both set the search parameter to UPPER and the column to UPPER (Pseudo-SQL: select p.* from Person p join Tags t on p.id=t.pId where upper(t.name)=upper('searchParameter'); ) Here is my code without the UPPER on the tags: CriteriaBuilder builder = this.em.getCriteriaBuilder();