3 Replies Latest reply on May 19, 2006 6:50 AM by Atanas Todorov

    @OrderBy does not work as expected?

    Atanas Todorov Newbie

      I have an entity bean, which has a @ManyToMany association to itself. But it appears that the @OrderBy annotation is not functioning in this case... (no exceptions - just the result is not sorted at all)


      public class Client implements Serializable {
       private List<Client> partners;
       @OrderBy("name") // I tried different fields, but no effect...
       // the default should sort by id, but it doesn't work either
       public List<Client> getPartners() {
       return partners;
       public void setPartners(List<Client> partners) {
       this.partners = partners;