You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "chunlinyao (JIRA)" <ji...@apache.org> on 2012/10/12 15:23:02 UTC

[jira] [Commented] (OPENJPA-213) @Column with precision and scale should result in NUMERIC(precision, scale)

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

chunlinyao commented on OPENJPA-213:
------------------------------------

DB2 And Derby still map BigDecimal to DOUBLE. Although this path map BigDecimal to Types.NUMERIC ,but AbstraceDB2Dictionary.java file set numericTypeName to DOUBLE in its constructor.
I don't know why it defined to DOUBLE. @curtisr7 tried to fix it at OPENJPA-1224 but finally rolled back the changes.
                
> @Column with precision and scale should result in NUMERIC(precision, scale)
> ---------------------------------------------------------------------------
>
>                 Key: OPENJPA-213
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-213
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 0.9.7, 1.1.0
>            Reporter: Jacek Laskowski
>            Assignee: Michael Dick
>             Fix For: 1.3.0, 2.0.0-M2
>
>         Attachments: OPENJPA-213.patch.txt
>
>
> @Column provides the precision and scale attributes, but there's no (easy) way to figure out how it affects the way OpenJPA works if any. It looks like OpenJPA reads the type of a persistent field and when it's double it maps it to DOUBLE in Derby regardless of the other attributes. When precision and scale are specified, a DDL should use NUMERIC(precision, scale) or its synonim - DECIMAL(precision, scale).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira