-->
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.  [ 1 post ] 
Author Message
 Post subject: Need a HQL Query
PostPosted: Sat Jul 12, 2008 11:59 pm 
Newbie

Joined: Sun Jul 06, 2008 9:32 pm
Posts: 6
how to qrite Hql for this scanerio.

I have mapping like this Departments--(1 to many)--Employees---(1 to many)-->Courses

I am looking for a hql query like below

List list = session.createQuery("from where Departments d where d.department_id = 2 and d.employess.employee_id=12 and d.employess.courses.status=1");

In mapping file, I have setup Fetch="join" and batch-size=10. My intention is to load the results in Department object and storing it into a List. Later, i would navigate through Department bean to navigate the associations.

Thanks
Sarab


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.