[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1657) hql update generate wrong sql with joined subclass hierarcy
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Mar 20 21:51:50 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-1657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole updated HHH-1657:
--------------------------------
Assignee: Steve Ebersole (was: Gail Badner)
> hql update generate wrong sql with joined subclass hierarcy
> -----------------------------------------------------------
>
> Key: HHH-1657
> URL: https://hibernate.onjira.com/browse/HHH-1657
> Project: Hibernate ORM
> Issue Type: Bug
> Components: query-hql
> Environment: Hibernate 3.2.0cr1, Hibernate 3.1.3
> Reporter: Alexey Romanchuk
> Assignee: Steve Ebersole
>
> Let suppose that we have two joined subclass entities: Parent (id PK) and Child (id PK) that mapped with joined subclass method.
> When I try to update Child by id with hql:
> update Child c set c.field = 'value' where c.id = 1234
> hibernate generates joined tables like
> insert into HT_parent select child0_.id as id from child child0_ inner join parent child0_1_ on child0_.id=child0_1_.id wher id in = 1234
> look at last condition. hibernate use id WITH OUT tables alias that cause sql exception: column reference "id" is ambiguous
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list