-->
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: Two Table Connection and Fetch
PostPosted: Tue Jun 06, 2006 8:04 am 
Beginner
Beginner

Joined: Tue Jun 06, 2006 7:56 am
Posts: 20
How to Connect two tables. And Fetch the particular records using Hiberante Classes.

Pls explain using Examples

Thanks
A.Edward Durai


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 06, 2006 8:21 am 
Expert
Expert

Joined: Thu May 26, 2005 9:19 am
Posts: 262
Location: Oak Creek, WI
Hi,

You can use Restriction in Criteria API. Please go through the below link

http://www.hibernate.org/hib_docs/v3/re ... rycriteria

or an HQL as below

from Cat cat, Cat rival where cat.mate = rival.mate

_________________
RamnathN
Senior Software Engineer
http://www.linkedin.com/in/ramnathn
Don't forget to rate.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 06, 2006 8:27 am 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
Edward,

Could be be a bit more specific with your question? Are you looking to map a single class against two or more tables, or would you like to issue a query which joins two or more classes?

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


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.