openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Forrest Xia <>
Subject @OrderBy not work?
Date Thu, 17 Sep 2009 14:57:58 GMT


I tried @OrderBy on a list field, but whatever I set it, it always sorts the
target entity by the identity.

Code snip like this:

public class B {
  private f1;
  private f2;
  private f3;

public class A {
  private p1;
  private p2;
  @OrderBy("f3 DESC")
  private Collection p3;

As the example, query p3, the return list's order is always by B's id "f1'
ascending, though I set to order by f3. Is it a known bug?

I am using OpenJPA 1.2.1 bundled in Geronimo. Thanks for any comments!

Regards, Forrest
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message