[
https://issues.apache.org/jira/browse/OPENJPA-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133201#comment-18133201
]
ASF subversion and git services commented on OPENJPA-3035:
----------------------------------------------------------
Commit 3bf8cacf95c3f1e0b93f220b6bb5d0ee15e31ea8 in openjpa's branch
refs/heads/OPENJPA-3035 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=3bf8cacf9 ]
[OPENJPA-3035] Apply numeric promotion to the result type of arithmetic
expressions
> MySQL: numeric operations return Long where Integer is expected
> ---------------------------------------------------------------
>
> Key: OPENJPA-3035
> URL: https://issues.apache.org/jira/browse/OPENJPA-3035
> Project: OpenJPA
> Issue Type: Sub-task
> Reporter: Richard Zowalla
> Priority: Major
>
> On MySQL, arithmetic on integer attributes returns a {{Long}}:
> {noformat}ClassCastException: class java.lang.Long cannot be cast to class
> java.lang.Integer{noformat}
> The JPA spec gives the result type of these operations from the operand
> types, so the value has to be converted to the expected type.
> Failing tests: {{Client5.diffNumberExpTest}}, {{neg}}, {{sumNumExpTest}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)