[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2408) Incorrect SQL generated for JPA QL Update statement involving multiple entities
Istvan Kovacs (JIRA)
noreply at atlassian.com
Thu Feb 16 09:50:13 EST 2012
[ https://hibernate.onjira.com/browse/HHH-2408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45528#comment-45528 ]
Istvan Kovacs commented on HHH-2408:
------------------------------------
Steve,
thanks for the quick update.
Here is the query:
{quote}
UPDATE Issue i SET i.dueDate = i.dueDate + 10 WHERE i.visit.branch.id = :branchId
{quote}
The UPDATE clause is defined as:
{quote}
UPDATE entity_name [[AS] identification_variable]
SET update_item \{, update_item\}*
{quote}
As far as I see, in this case it's
UPDATE Issue i SET i.dueDate = i.dueDate + 10
It appears to me that this contains only one 'entity abstract schema type', namely 'Issue'.
Am I mistaken?
Thanks,
Kofa
> Incorrect SQL generated for JPA QL Update statement involving multiple entities
> -------------------------------------------------------------------------------
>
> Key: HHH-2408
> URL: https://hibernate.onjira.com/browse/HHH-2408
> Project: Hibernate ORM
> Issue Type: Bug
> Components: query-hql
> Affects Versions: 3.2.2
> Environment: Hibernate 3.2.2 GA, Oracle 9i
> Reporter: Alex Savitsky
> Attachments: application.properties, Branch.java, Issue.java, log.txt, PersistentEntity.java, TestCase.zip, Visit.java
>
>
> When generating SQL for statements like this: UPDATE Issue i SET i.dueDate = i.dueDate + 10 WHERE i.visit.branch.id = :branchId, an extra comma is generated at the end of table list: update Issue, set DUE_DATE=DUE_DATE+10 where BRANCH_ID=?
--
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