persistence@glassfish.java.net

Re: Case insensitive query for JPA Order By clause?

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Wed, 11 Apr 2007 19:10:47 +0200

Hi Tim,

I am not aware of any such feature in the Java Persistence query
language. So I'm afraid you need to use a native query if the other
ordering is important.

Regards Michael

> I noticed that when issued an ORDER BY clause as part of a query, it
> uses the binary value instead of an ASCII or linguistic value. Is
> there a way with JPA to force a case insensitive sort on the query?
> NLS_SORT?
>
> “select object(o) from MyEntity as o ORDER BY o.anyParticularField”
>
> Tim
>