[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-423?page=co...
]
Sanne Grinovero closed EJB-423.
-------------------------------
Resolution: Rejected
I'm sure hibernate is smart enough, if you still have trouble with it please ask to
the forums and show code/provide testcases.
Smarter Joins - One instead of Two
----------------------------------
Key: EJB-423
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-423
Project: Hibernate Entity Manager
Issue Type: Improvement
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: Hibernate with PostgreSQL
Reporter: Bradford
Priority: Minor
I have CompanyLocation that has a station property as ManyToOne with Station.
StationLocale has a station property as ManyToOne with Station. I created a OneToMany
relationship in Station that's called localizedStation.
If I write the following:
left join colocs.station.localizedStation as sl
It creates two left joins when it gets converted to SQL:
left outer join stations station4_
on companyloc0_.station_code=station4_.code
left outer join station_locales localizeda5_
on station4_.code=localizeda5_.station_code
This is a waste. Shouldn't it be smart enough to generate the following:
left outer join station_locales localizeda5_
on companyloc0_.station_code=localizeda5_.station_code
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira