-->
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: how to write query to add 4 tables using java class
PostPosted: Sat Jul 19, 2008 8:00 am 
Newbie

Joined: Fri Jul 18, 2008 3:12 am
Posts: 2
Location: bengaluru
i am using 4 java class and 4 hbm files, in all tables there is 1 primanry key and other tables are related with foreign keys. how to write query to join all 4 tables and get result.

i want query with hibernate objects

if anyone knows please send the query.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2008 10:16 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
It might be easier to do a Hibernate criteria query:

Hibernate3 Tutorial: How to Use the Hibernate Criteria API

We need to know your objects to help you with HQL. But Hibernate Query language isn't that tough. Here's a tutorial on the topic:

How to Use the Hibernate3 Query Language, HQL, in your Java Code

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.