[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-6714) Parentheses dissapear in HQL query where they should stay

Strong Liu (JIRA) noreply at atlassian.com
Thu Nov 3 15:24:19 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu updated HHH-6714:
----------------------------

    Summary: Parentheses dissapear in HQL query where they should stay  (was: Parentheses dissapear in simple JPQL update query where they should stay)

> 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
>
> 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