Is there a way around declaring the fully qualified Class name. I get class not found exception. I also tried various permutations of the setEntity method but they don't seem to work. What am I doing wrong?
Thanks
This doesn't workCode:
Query query = session.createQuery("select new Junk(prod.id, prod.attributeId) from Production as prod");
[cause=java.lang.ClassNotFoundException: Junk]
Caused by: org.hibernate.hql.ast.QuerySyntaxException: Unable to locate class [Junk] [select new Junk(prod.id, prod.attributeId) from com.xxx.applications.data.Production as prod]
but this does:Code:
Query query = session
.createQuery("select new com.xxx.applications.data.Junk(prod.id, prod.attributeId) from Production as prod");