-->
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: OneToMany JoinColumnsOrFormulas does not work
PostPosted: Wed Mar 06, 2013 1:07 am 
Regular
Regular

Joined: Tue Feb 19, 2008 6:05 pm
Posts: 82
A one-to-many JoinColumnsOrFormulas does not exist; a one to many relationship would allow us to write a query as:
parent outer join child on
parent.col1 = child.col2 // POSSIBLE using @JoinColumn
and parent.col2 = some_formula // POSSIBLE using @JoinFormula
and child.some_col = some_formula // NOT POSSIBLE
where child is null
Here the child.some_col = some_formula cannot go into a where clause and there is no way to join?
A many-to-one JoinColumnsOrFormulas works
child inner/outer join parent on parent.some_col = some_formula works fine


Top
 Profile  
 
 Post subject: Re: OneToMany JoinColumnsOrFormulas does not work
PostPosted: Mon Mar 11, 2013 1:05 am 
Regular
Regular

Joined: Tue Feb 19, 2008 6:05 pm
Posts: 82
So, how do we do a left outer join on collection with additional join clauses, there is none.

Only way left is doing a full left outer join on collection and filtering those that you don't need I guess. Another option is using a not in.


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.