]
Strong Liu updated HHH-6714:
----------------------------
Component/s: (was: entity-manager)
query-hql
Parentheses dissapear in simple JPQL update query where they should
stay
------------------------------------------------------------------------
Key: HHH-6714
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6714
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.6.7, 4.0.0.CR4
Environment: Tried on Hibernate 3.6.7 and 4.0.0.CR4 with PostgreSQL database
Reporter: Peter Gwiazda
Priority: Critical
Labels: HQL, jpa2
I create simple update query
{noformat}
em.createQuery("update WorkMessage workMessage set workMessage.earnedPrice = -(
workMessage.totalCost - :a1 )")
.setParameter("a1", 12.0f)
.executeUpdate();
{noformat}
and the SQL is (yelled by hibernate log)
{noformat}
09:18:10.880 [main] DEBUG org.hibernate.SQL - update work_message set
earned_price=-total_cost-?
{noformat}
{{- total_cost - 12}} is not the same as {{- (total_cost - 12)}}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: