Hi I am trying to use typesafe Java object in HQL QUERY:
(Session) getHibernateSession()).createQuery("select new IssueTracker(d.documentID, dq.queryDesc) from Document d, DocumentQuery dq where d.documentID = dq.documentID");
i created a class IssueTracker having constructor :
IssueTracker(Long docID, String desc)
but when i run the query I am getting the exception :
net.sf.hibernate.QueryException: class not found: IssueTracker [select new Issue
Tracker(d.documentID, dq.queryDesc) from com.trinitybpm.indexing.document.Docume
nt d, com.trinitybpm.indexing.document.DocumentQuery dq where d.documentID = dq.
documentID]
do I need to have mapping of the IssueTracker class in mapping file, though i read that no such mapping is required.
i m using hibernate 2.1.
plz guide me how to use the IssueTracker class with HQL select new construct
|