[
https://issues.apache.org/jira/browse/OPENJPA-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maxim Solodovnik resolved OPENJPA-3035.
---------------------------------------
Resolution: Fixed
> 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
> Fix For: 4.2.0
>
>
> 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)