-->
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: Joining 2 tables even if data in not available
PostPosted: Wed Mar 18, 2009 8:39 pm 
Newbie

Joined: Thu Jun 19, 2008 3:23 pm
Posts: 4
Hi,

Need some help in understanding hibernate joins.

We have 2 tables 1 stores customer information like userid,password and other table store promotion like if customer eligible for free shipping or discount but it doesn't me every customer is eligible so for some customer they wont have any record in 2nd table.

Any help would be greatly appricated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 3:26 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Seems like you need to us a "left join". There is a nice page in the Hibernate documentation about queries with joins: http://www.hibernate.org/hib_docs/v3/re ... joins.html


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.