-->
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: Joins on Four tables
PostPosted: Wed Feb 23, 2011 7:06 pm 
Newbie

Joined: Wed Feb 23, 2011 6:23 pm
Posts: 5
Hi All

Can criteria API be used for joins on four different tables. Can the joins be performed without association mapped in hbm files.
Can you please provide reference to samples with complex join queries in hibernate either by using HQL or Criteria API's

Thanks in Advance


Top
 Profile  
 
 Post subject: Re: Joins on Four tables
PostPosted: Thu Feb 24, 2011 6:36 am 
Regular
Regular

Joined: Fri Jan 28, 2011 11:44 am
Posts: 117
Hi,

Using HQL you cannot join 2 tables that are not mapped in hbm files, and I think it's the same with the criteria API.
If you want to do that you need to use a cross join ... but I think the best way is to define a relation between the 2 tables!


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.