-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Default Scale value in MySQL
PostPosted: Mon Aug 20, 2007 9:33 am 
Newbie

Joined: Sat Apr 28, 2007 6:21 am
Posts: 2
Hello.
I'm use Hibernate 3.2GA

In my Mapping documents:
...
<property name="goodsNumeric" lazy="false" insert="true" update="true" not-null="false" unique="false" type="java.math.BigInteger">
<column not-null="false" unique="false" name="`goodsnumeric`" precision="5"/>
</property>
...

Name and version of the database you are using:MySQL 5.0.37

From MySQL documentation
In standard SQL, the syntax DECIMAL(M) is equivalent to DECIMAL(M,0).

But In log and in database scale=2, it's have to be exactly 0.

Debug level Hibernate log excerpt:
12484 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaUpdate - create table `goodsitembasetype` (e_id bigint not null auto_increment, e_version integer not null, `goodsnumeric` numeric(5,2), `grossweightquantity` numeric(19,6), `netweightquantity` numeric(19,6), `invoicedcost` numeric(16,2), `customscost` numeric(16,2), `statisticalcost` numeric(16,2), primary key (e_id))

What I should do?

_________________
Sorry from my English


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.