[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-16?page=com...
]
hugo commented on HHH-16:
-------------------------
Ok, for the issue HB-1441 *there is a solution*. I never heard about the "WITH"
keyword in the online documentation, but it appears to works perfectly as a criteria on
the ON clause !
For instance one could generate the following (pseudo) SQL :
[...]
LEFT JOIN car AS customer_car ON car.brand_id = brand.id AND
customer_car.color='yellow'
[...]
using the following (pseudo) HQL:
[...]
LEFT JOIN car.brand AS customer_car WITH customer_car.color='yellow'
[...]
Good to know ! It should be be added to the documentation ;) (Can I help here ?)
PS: sorry to hijack this issue, but I can't comment directly in HB-1441
Explicit joins on unrelated classes
-----------------------------------
Key: HHH-16
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-16
Project: Hibernate Core
Issue Type: New Feature
Components: core
Affects Versions: antlr-rework
Environment: Any
Reporter: David Lloyd
Assignee: Steve Ebersole
Fix For: antlr-rework
It would be nice to be able to do explicit joins on unrelated classes with HQL:
(hope this renders correctly)
select empl, phone
from org.example.Employee empl
left outer join org.example.PhoneBook phone
on phone.lastName = empl.lastName
and phone.firstName = empl.firstName
where empl.salaryGrade > 10
Note that this would also implicity solve HB-1089 because you could list join criteria
that match what Hibernate would have chosen anyway (i.e., list a many-to-one relationship
as a criteria explicitly).
Syntactically this could be disambiguated from the existing join syntax because the token
after "join" is a class name rather than a property name.
--
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