-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: PROBLEM in using HQL select new construct
PostPosted: Wed May 11, 2005 7:59 am 
Newbie

Joined: Tue Dec 28, 2004 6:25 am
Posts: 16
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 11, 2005 11:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well, I would assume IssueTracker is in a package other than the java default package? If so give the FQN, otherwise how is Hibernate supposed to find it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 11, 2005 11:49 pm 
Newbie

Joined: Tue Dec 28, 2004 6:25 am
Posts: 16
Thanks Steve, ur suggestion worked , i was only missing the full package name for the IssueTracker class.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.