-->
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.  [ 2 posts ] 
Author Message
 Post subject: Help !!! cannot run named queries
PostPosted: Thu Nov 17, 2005 8:53 am 
Newbie

Joined: Tue Oct 18, 2005 2:51 am
Posts: 14
Location: Chennai, India
Hi everybody,

I got into a problem. Must be a silly one. But I am not getting the answer anywhere and I need it urgently.

Problem
I have a named sql query (which has columns from multiple tables) and I want to put the results in a class. But the class map is always asking for a table for a class.

How to solve it?

regards,
Neil


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 27, 2005 2:43 pm 
Regular
Regular

Joined: Wed May 05, 2004 3:41 pm
Posts: 118
Location: New Jersey,USA
You could so something like

Code:
select new Object(a.col1,b.col2)
from classA a
left join classB b
where b.col3=<some condition>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.