openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <...@cndavies.com>
Subject RE: MySQL ignoring BigDecimal precision.
Date Mon, 03 Aug 2009 20:09:13 GMT
OK sure will do

-----Original Message-----
From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
Sent: Tuesday, 4 August 2009 6:02 AM
To: users@openjpa.apache.org
Subject: Re: MySQL ignoring BigDecimal precision.

Hi Chris,

Can you please file a JIRA with a reproducible test case?

Thanks,

Craig

On Aug 3, 2009, at 12:29 PM, C N Davies wrote:

> I'm using MySQL and I find that when Open JPA generates the tables it
> defaults any BigDecimal columns to Decimal(10,0) ignoring my  
> annotation that
> says I want 10,6.  I'm using:
>
>
>
>                @Column(name="chargerate", precision=10,scale=6,
> nullable=false)
>
>
>
> The manual says there is an issue with Floats and Doubles but doesn't
> mention BigDecimals:
>
>
>
> "Floats and doubles may lose precision when stored in some  
> datastores."
>
>
>
> I'm using InnoDB tables on MySQL 5.1.32
>
>
>
> Thanks
>
>
>
> Chris
>
>
>
>
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!



Mime
View raw message