remove a strange statement that was simply wrong from the docs

This commit is contained in:
Gavin King 2022-01-03 21:01:01 +01:00
parent 0e55930c75
commit b72e2620c6
2 changed files with 3 additions and 11 deletions

View File

@ -330,6 +330,7 @@ include::{sourcedir}/HQLTest.java[tags=hql-string-literals-example]
----
====
[[hql-numeric-literals]]
==== Numeric literals
Numeric literals come in several different forms.
@ -605,10 +606,7 @@ include::{sourcedir}/HQLTest.java[tags=hql-searched-case-expressions-example]
----
====
[[hql-case-arithmetic-expressions]]
===== Case expressions with arithmetic operations
Any arithmetic operation in the `case` expression must be enclosed in parentheses, as illustrated by the following example:
A `case` expression may contain complex expression, including operator expressions:
[[hql-case-arithmetic-expressions-example]]
//.Case expression with arithmetic operation example
@ -619,12 +617,6 @@ include::{sourcedir}/HQLTest.java[tags=hql-case-arithmetic-expressions-example]
----
====
[IMPORTANT]
====
If the arithmetic expression was not enclosed in parentheses, the parser would be unable to parse the expression.
====
[[hql-exp-functions]]
=== Functions

View File

@ -2135,7 +2135,7 @@ public class HQLTest extends BaseEntityManagerFunctionalTestCase {
List<Long> values = entityManager.createQuery(
"select " +
" case when p.nickName is null " +
" then (p.id * 1000) " +
" then p.id * 1000 " +
" else p.id " +
" end " +
"from Person p " +