Hey all,
I didnt find this in search:
I want to select some field values in a plain old java object that I've defined as MyDTO. It has a constructor that accepts all the values I'm selecting and in that order:
Code:
select new MyDTO ( a.field1, a.field2, b.field1 )
from AClass a,
BClass b
where a.field4 = b.field4
The error I'm getting is org.hibernate.hql.ast.QuerySyntaxError: Unable to locate class [MyDTO] [
and then the trace, (run from Junit within Eclipse).
What gives here? I have my import set in the dao class just in case. The reason I'm doing it this way is to have a small and convenient class to package and potentially modify the values, and not full the full long fields which includes heavy objects like clobs.
Thanks in advance.