openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Mihai Dumitriu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-213) @Column with precision and scale should result in NUMERIC(precision, scale)
Date Tue, 26 Feb 2008 14:58:54 GMT

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

Dan Mihai Dumitriu commented on OPENJPA-213:
--------------------------------------------

When using BigDecimal, presumably one is trying to get arbitrary precision, in our case for
currency values.  Mapping simply as FLOAT just simply doesn't work!  I get rounding error
all the time.

Is there any workaround for this?  Can I modify the DDL manually?  Does OpenJPA extract the
double() from BigDecimal or store it as a String?


> @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
>            Reporter: Jacek Laskowski
>            Assignee: Michael Dick
>
> @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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message