openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <>
Subject Case indifferent query
Date Wed, 16 Jun 2010 19:36:45 GMT

This is probably a general JPA questions rather than OpenJPA, perhaps you'll

I can do this in SQL:

select * from users where lower(userCode) in ('ab', 'cd');

to do a case indifferent (insensitive) match, assuming 'ab' and 'cd' already
lowercase. The following fails in JPQL:

select o from User as o where lower(o.userCode) in ('ab', 'cd')

(Encountered "lower ( o . userCode ) in" at character ...)

Can I reform this somehow to do a case insensitive "IN" expression. (I have
literal values here in the list, but I'm using a Set<String> in the real


Daryl Stultz
6 Degrees Software and Consulting, Inc.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message