-->
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: getting data from a second table
PostPosted: Mon Jun 27, 2005 3:26 am 
Newbie

Joined: Mon May 30, 2005 2:23 am
Posts: 7
I have a class and a related table. I have created the hbm file for that. The table has a user id column. I want to populate details corresponding to that user id from another table. The second table has a non pojo class. I don't want to create a mapping hbm file for that. Can I select some fields from the second table while querying the first table? First of all, is this possible? If so, what modification should I make in the hbm file for this purpose?

Thanks & Regards
Merin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 8:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can use a custom SQL query. In HQL or Criteria queries you can only work on a "mapped class level"


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.