-->
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.  [ 3 posts ] 
Author Message
 Post subject: Why NHibernate used Decimal(19,5) for mapping Money type ?
PostPosted: Thu Mar 16, 2006 9:45 am 
Newbie

Joined: Thu Aug 25, 2005 3:14 am
Posts: 19
Hi!
Hibernate version:1.0.2.0

I'm work with MSSql 2000 and i need to save big value in table who have a column with type Money.
Actually i need save a value = - 1000 000 000 000 00

But NHibernate don't correctly generated insert or update script.
Genetared script included parameter with type Decimal(19,5), but
in MSSql type money must be mapped to type decimal(19,4) (by SQL Server Books Online).

This is mistakes "By design" or I may be don't understand something?

Thanks.




[/code]

_________________
------------------------------
NETDigitally yours Jericho


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 16, 2006 12:32 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You can specify precision and scale of decimals in the mapping, for example:
Code:
<property name="SomeProperty" type="Decimal(19,4)" />


The default precision and scale values are more or less arbitrary.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 2:45 am 
Newbie

Joined: Thu Aug 25, 2005 3:14 am
Posts: 19
Hi Sergey!
sergey wrote:
You can specify precision and scale of decimals in the mapping, for example:
Code:
<property name="SomeProperty" type="Decimal(19,4)" />


The default precision and scale values are more or less arbitrary.


It`s really works!!! Thanks!!!!!

_________________
------------------------------
NETDigitally yours Jericho


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

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.