[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1107) HQL nested property reference without alias doesn't work if the property is *not* a component
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Mar 21 13:00:51 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-1107.
-------------------------------
Closing stale resolved issues
> HQL nested property reference without alias doesn't work if the property is *not* a component
> ---------------------------------------------------------------------------------------------
>
> Key: HHH-1107
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1107
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5, 3.1 rc2
> Reporter: Joshua Davis
> Assignee: Joshua Davis
> Original Estimate: 24h
> Time Spent: 4h
> Remaining Estimate: 20h
>
> HQL nested property reference without alias doesn't work if the property is *not* a component.
> WORKAROUND: Use an alias.
> If an HQL expression without an allias refers to a nested property inside an association (or a collection), then the property is resolved incorrectly. It treats the nested property reference as if it were a property of the non-aliased entity.
> For example, in the Animal/Zoo mappings in the Hibernate unit tests:
> from Animal where zoo.address.street = '123 Bogus St.'
> the expression zoo.address.street attempts to resolve 'address' inside Animal, not Zoo. This is because the IdentNode code assumes that anything that isn't a component is a property reference, when what it should do is resolve the association and generate an implied join.
--
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