You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by dmd <dm...@cornell.edu> on 2008/02/12 01:29:57 UTC

BigDecimal being stored as FLOAT(32) rather than NUMERIC

Related to issue https://issues.apache.org/jira/browse/OPENJPA-213

I am using Microsoft SQL Server, so I did set the property
openjpa.jdbc.DBDictionary to sqlserver, but to no avail.  For BigDecimal
fields OpenJPA generates DDL which creates FLOAT(32).

Help!  I need to get this solved!!

-- 
View this message in context: http://www.nabble.com/BigDecimal-being-stored-as-FLOAT%2832%29-rather-than-NUMERIC-tp15424039p15424039.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: BigDecimal being stored as FLOAT(32) rather than NUMERIC

Posted by Michael Dick <mi...@gmail.com>.
I don't think this is the same issue as OPENJPA-213, which has to do with
the @Column annotation. Rather this is an issue with the SQLServer DB
dictionary.

That being said you can add the following property in persistence.xml to
workaround the problem :
            <property name="openjpa.jdbc.DBDictionary"
value="sqlserver(DoubleTypeName=DOUBLE)"/>

DoubleTypeName can be set to any SQL identifier you want to use for Double
and BigDecimal types.

-Mike


On Feb 11, 2008 9:14 PM, Craig L Russell <Cr...@sun.com> wrote:

> Hi dmd,
>
> It's best to add comments to the jira issue itself so comments related
> to the issue can be found in one place.
>
> Regards,
>
> Craig
>
> On Feb 11, 2008, at 4:29 PM, dmd wrote:
>
> >
> > Related to issue https://issues.apache.org/jira/browse/OPENJPA-213
> >
> > I am using Microsoft SQL Server, so I did set the property
> > openjpa.jdbc.DBDictionary to sqlserver, but to no avail.  For
> > BigDecimal
> > fields OpenJPA generates DDL which creates FLOAT(32).
> >
> > Help!  I need to get this solved!!
> >
> > --
> > View this message in context:
> http://www.nabble.com/BigDecimal-being-stored-as-FLOAT%2832%29-rather-than-NUMERIC-tp15424039p15424039.html
> > Sent from the OpenJPA Users mailing list archive at Nabble.com.
> >
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>

Re: BigDecimal being stored as FLOAT(32) rather than NUMERIC

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi dmd,

It's best to add comments to the jira issue itself so comments related  
to the issue can be found in one place.

Regards,

Craig

On Feb 11, 2008, at 4:29 PM, dmd wrote:

>
> Related to issue https://issues.apache.org/jira/browse/OPENJPA-213
>
> I am using Microsoft SQL Server, so I did set the property
> openjpa.jdbc.DBDictionary to sqlserver, but to no avail.  For  
> BigDecimal
> fields OpenJPA generates DDL which creates FLOAT(32).
>
> Help!  I need to get this solved!!
>
> -- 
> View this message in context: http://www.nabble.com/BigDecimal-being-stored-as-FLOAT%2832%29-rather-than-NUMERIC-tp15424039p15424039.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

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