When using this query :
em.createQuery("Select New MYPACKAGE.Object(o.date) from Object o");
While the used constructor is the following :
public Object(java.sql.Date date) { super(); this.date= date; }
An "Unable to locate appropriate constructor on class" error is caught.
Solved the issue locally by using a cast in the constructor while changing the entry type to java.util.Date :
public Object(java.util.Date date) { super(); this.date = (java.sql.Date) date; }
|