openjpa-users mailing list archives

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

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

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
query).

Thanks.


--
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:daryl.stultz@opentempo.com

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