-->
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.  [ 4 posts ] 
Author Message
 Post subject: additional conditions in join clauses
PostPosted: Thu Jul 15, 2004 5:31 am 
Regular
Regular

Joined: Wed May 05, 2004 8:01 am
Posts: 53
I have a query that I found needs an additional condition in join clause. Is this kind of feature planned in Hibernate?

Example:

Code:
select dr.id, dr.dueDate, c.name, sd.name, d.id, d.name
from Survey s right outer join s.dueReport dr *** with s.merchandiser = ? ***
join dr.surveyDefinition sd join sd.contractor c,
Merchandiser m
join m.tasks t join t.depot d
where s is null
and t.surveyDefinition = sd
and m = ?


Briefly saying the query searches for all surveys that have not been done by particular user. There might be another same surveys made by other users so I need to introduce addional condition in right outer join.

I might also use subselect - the problem is my database is MySQL and this feature is also not available.

Without the solution I will end up with making one master query and thousands details query (list all "tasks" and check if they have been done by particular user by querying survey existence). The number of queries will also grow in time making the function call last longer and longer.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 7:36 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
No AFAIK but you can vote for this issue in Jira 'or create it)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 7:49 am 
Regular
Regular

Joined: Wed May 05, 2004 8:01 am
Posts: 53
Is there such entry already or should I create a new one? I am browsing for it but can't see anything like that.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 8:02 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
can't remember, create a new one

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.