-->
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
PostPosted: Thu May 08, 2008 11:43 am 
Newbie

Joined: Thu May 08, 2008 11:27 am
Posts: 1
Dear all,

please give me help information for may problem.

I have in my project this model structure

D class has atributes d1, d2
A class has attributes a1, a2
D is in 0..1-0..1 association with A

A is in 0..1-0..* association with CR

N (with attributes n1 and n2) and M(with attributes m1 and m2) extend CR

How to create query that return d1, d2,n1,m1 for all D objects from those tables in case that some objects from D don't have via A associated objects N or M ?

I've tried with outer join but I havn't had result. I got emty result for existed objects D which don't have object M or N.

select d1,d2,n1,m1
from D d, M m, N n
where
d.a_id = m.a_id and
d.a_id = n.a_id

If you have some idea for my problem please help me

Thank you in advance!!!


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.