[ 
https://issues.apache.org/jira/browse/OPENJPA-3058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136736#comment-18136736
 ] 

ASF subversion and git services commented on OPENJPA-3058:
----------------------------------------------------------

Commit a75ec28b8c8888bbe7fb4d211ca1d9977fbbe604 in openjpa's branch 
refs/heads/OPENJPA-3058 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=a75ec28b8 ]

[OPENJPA-3058] Map BigInteger to NUMERIC on H2 in the getJDBCType overload used 
by column mapping


> H2: a BigInteger column is created as BIGINT
> --------------------------------------------
>
>                 Key: OPENJPA-3058
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3058
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> On H2, a {{BigInteger}} attribute gets a {{BIGINT}} column, so a value with 
> more than 19 digits fails with "Numeric value out of range".
> {{H2Dictionary}} overrides {{getJDBCType(int, boolean)}} to map 
> {{JavaTypes.BIGINTEGER}} to {{Types.NUMERIC}}, but column mapping calls the 
> overloads with precision and scale ({{getJDBCType(int, boolean, int, int[, 
> boolean])}}), which do not go through the two-argument method. The override 
> is therefore never used during mapping and the base mapping to {{BIGINT}} 
> applies.
> The override should move to the overload that mapping uses, and the column 
> should be a {{NUMERIC}} with enough precision for the value (H2 2.x reads a 
> plain {{NUMERIC}} as {{NUMERIC(100000, 0)}}, see OPENJPA-3051).
> Found while working on OPENJPA-3051.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
  • [jira] [Commented] (OPENJPA... ASF subversion and git services (Jira) via dev

Reply via email to