deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akash malik <>
Subject Cannot use Order By on a field in Embedded class in deltaspike 1,6
Date Fri, 21 Apr 2017 07:23:20 GMT

Hi Team

I encountered a issue recently where i was not able to sort a list based on a field present
in one of the embedded classes .

Please let me know if it is a known issue otherwise i will report it .

Please find below description for issue :

I am trying to sort record of my employee class on the basis of updatedOn field. UpdatedOn
field is in class ChangeInfo which is embedded class of employee class. I am doing this using
apache deltaspike.

Example :

Criteria crtieria = findEmployees(); criteria.join(Employee_.changeInfo,where(ChangeInfo.class).orderDesc(ChangeInfo_.updatedOn));

When i use above code , i donot get a order by clause appended in final query.

 @Table(name = "employee")
 public class Employee
  @Column(name = "id", unique = true, nullable = false, precision = 9)
   private Long id ;
   @Column(name = "name")
   private String name;
   @Column(name = "designation")
   private String designation;
   private ChangeInfo changeInfo;


public class ChangeInfo {

  @Column(name = "updated_on")
  private Date updatedOn;

  @Column(name = "updatedBy")
  private String updatedBy;


Akash Malik

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