[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6323) Duplicate SQL joins
jose (JIRA)
noreply at atlassian.com
Wed Jun 15 04:46:24 EDT 2011
Duplicate SQL joins
-------------------
Key: HHH-6323
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6323
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.6
Environment: On Ubuntu Linux with H2/Sybase databases
Reporter: jose
Priority: Blocker
Next HQL generate duplicate joins for mother table:
select a
from cat as a
join a.mother <= generates first sql join with mother table
where a.mother.name='Kitty' <= generates second sql join mother table
Same problem with this:
select a
from cat as a
join a.mother b <= generates first sql join with mother table
where a.mother.name ='Kitty' <= generates second sql join mother table
In 3.3 version detect joins name/alias used in where to avoid duplicated sql joins
Of course, forcing alias usage remove duplicate sql joins
select a
from cat as a
join a.mother b
where b.name ='Kitty'
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list