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: entity-manager
Affects Versions: 4.0.0.CR4, 3.6.7
Environment: Tried on Hibernate 3.6.7 and 4.0.0.CR4 with PostgreSQL database
Reporter: Peter Gwiazda
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:
http://www.atlassian.com/software/jira