-->
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: Special 'ON' condition in inner join
PostPosted: Wed Jan 18, 2012 7:54 am 
Newbie

Joined: Wed Jan 18, 2012 7:43 am
Posts: 1
Hi everyone,
I'm facing a problem with my hbm mapping and an help would be highly appreciated.

This is the scenario:
Table_A: id, initial_date, limit_date, description
Table_B: id, event_date, id_table_A (fk)

The query I would like to perform is:

select *
from Table_B b
inner join Table_A a on
b.id_table_A = a.id and
b.event_date >= a.initial_date and
b.event_date <= a.limit_date
where (....)

How can I realize a mapping to get the join translated by Hibernate exactly in this way? I don't want to move the condition in 'where' clause, because performance are really bad.

Thanks for any help you may provide.


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.