-->
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: Mapping for BigDecimal urgent
PostPosted: Fri Nov 09, 2012 12:26 pm 
Newbie

Joined: Fri Nov 09, 2012 12:13 pm
Posts: 1
I have to map a database column of size NUMBER(13,2).

Use Hibernate 2.0
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd

The mapping I have written is as follows, how will I specify the decimal values ?
<property
name="salaryAmount"
type="java.math.BigDecimal"
column="SALARY_AMOUNT"
length="13"
>
<meta attribute="field-description">
@hibernate.property
column="SALARY_AMOUNT"
length="13"
</meta>
</property>


I have tried adding the following instead of length, not sure whether this is correct as its compaling that the attributes scale, precision,sql-type should be declared for element property, can some one explain if this correct or is there any issue with this.


scale="13"
precision="2"
sql-type="number(13,2)"


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.