-->
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: Hibernate Query + Associations
PostPosted: Wed Apr 19, 2006 5:21 pm 
Newbie

Joined: Wed Apr 19, 2006 5:14 pm
Posts: 1
Hello friends,
I need your help with the following.

I have the following tables

Table A (a1, a2, ab) - a1 is the key, ab is foriegn jkey for table B
Table B (b1, b2, ab) - ab is the key

Table C(c1, c2, c3)

I want to use hiberate to come up with a query like this

select A.a1, A.a2, A.ab
from A, B
where A.ab = B.ab(+)
and B.b1 = :param1
and A.a2 in (select distinct c2 from C)

I have already created POJO's for all the tables
A object has List of B's and C object is seperate POJO.



I started out using Hibernate Query..but couldn't get to make it work.
But any approach is fine with me.

Any help is greatly appreciated.


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.