Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

precision in mapping a table to an object

 
Elinor Chang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens of I map a 16 long number to a 9 long BigDecimal in Hibernate as the following:

Table definition

RATE_TOT DECIMAL(16,14),

Hiberate config

<property
name="rateTot"
type="java.math.BigDecimal"
column="RATE_TOT"
length="9"
>
<meta attribute="field-description">
@hibernate.property
column="RATE_TOT"
length="9"
</meta>
</property>

The RATE_TOT is a 16 long numeric field but in mapping file it's declared as 9 long. What happens to those additional 7 digits?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic