[
https://issues.apache.org/jira/browse/OPENJPA-3044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136686#comment-18136686
]
ASF subversion and git services commented on OPENJPA-3044:
----------------------------------------------------------
Commit 3e30dea3fb3fcd2effdee7bb259b26f9312bc5b9 in openjpa's branch
refs/heads/OPENJPA-3051 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=3e30dea3f ]
[OPENJPA-3051] Keep the precision and scale of decimal columns on H2
H2 2.x reads an unsized NUMERIC as NUMERIC(100000, 0). H2Dictionary
listed NUMERIC and DECIMAL as fixed size types, so @Column(precision,
scale) was dropped from the DDL and fractional values were rounded to
integers. Write the precision and scale into the type name and create
an unsized decimal column of a non integral Java type as DECFLOAT(38)
on H2 2.x, unless NumericTypeName or DecimalTypeName was configured.
Read a DECFLOAT value with negative scale back with scale 0. Use
fractional decimals in the OPENJPA-3035 and OPENJPA-3044 tests.
> JPQL does not accept a sign in front of a path, e.g. SELECT -n.intA
> -------------------------------------------------------------------
>
> Key: OPENJPA-3044
> URL: https://issues.apache.org/jira/browse/OPENJPA-3044
> Project: OpenJPA
> Issue Type: Sub-task
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> JPQL does not accept a sign in front of a path or other arithmetic primary:
> {code}
> SELECT -n.intA FROM NumericOperands n
> {code}
> fails to parse. The JPQL grammar ({{JPQL.jjt}}) only allows a sign on numeric
> literals ({{negative()}}); {{arithmetic_factor}} has no optional sign. The
> Jakarta Persistence BNF defines {{arithmetic_factor ::= [{+ | -}]
> arithmetic_primary}}, so {{-n.intA}}, {{-(n.a + n.b)}} and {{+n.intA}} should
> be valid. The criteria API ({{cb.neg(x)}}) works.
> Found while working on OPENJPA-3035.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)