Following HQL:
"-(a.import + a.bill)"
gets translated to following SQL:
"-a.import + a.bill"
instead of expected:
"-(a.import + a.bill)"
This makes the operation to calculate a result diferent from what is expected.
The translation has been proved with org.hibernate.dialect.Oracle10gDialect and with org.hibernate.dialect.HSQLDialect
Hibernate's version is 3.5.1-Final
Does anybody knows why is this happening? is this a bug?