I have the following JPQL-query:
SELECT new se.callista.test.dto.EmployeeReportData(e.firstName, e.lastName, a.city,
e.employmentPeriod.startDate) FROM Employee e JOIN e.address a ORDER BY e.lastName,
e.firstName
|
where EmployeeReportData is a dto (not an entity). The query works fine when running it as
a normal query. When I put it as a named query however, I get the following error message
when trying to execute it: java.lang.IllegalArgumentException: Not an entity:class
se.callista.test.dto.EmployeeReportData
I can't find anything in the JPA-spec that says a named query cannot contain a
constructor expression - am I missing something?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012403#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...