[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-6714) Parentheses dissapear in HQL query where they should stay
Gail Badner (JIRA)
noreply at atlassian.com
Thu Dec 15 00:00:19 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gail Badner updated HHH-6714:
-----------------------------
Fix Version/s: (was: 3.6.next)
3.6.9
> Parentheses dissapear in HQL 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
> Assignee: Strong Liu
> Priority: Critical
> Labels: HQL, jpa2
> Fix For: 4.0.0.CR6, 3.6.9
>
>
> 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
More information about the hibernate-issues
mailing list