[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-16) Explicit joins on unrelated classes
Steve Ebersole (JIRA)
noreply at atlassian.com
Fri Jan 29 12:16:32 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35404#action_35404 ]
Steve Ebersole commented on HHH-16:
-----------------------------------
http://docs.jboss.org/hibernate/stable/core/reference/en-US/html_single/#queryhql
14.3. Associations and joins
{quote}
You may supply extra join conditions using the HQL with keyword.
from Cat as cat
left join cat.kittens as kitten
with kitten.bodyWeight > 10.0
{quote}
Could it be *better* documented? Sure, like later on there is only a brief warning about using fetch w/ with but its a serious thing to avoid.
If you want to step up and help improve the docs, please do :)
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list