-->
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: Type for Money field in NHibernate
PostPosted: Wed Nov 02, 2005 11:39 pm 
Newbie

Joined: Tue May 03, 2005 2:24 pm
Posts: 3
What is the type value to be used for "Money" data type in hibernate Mapping file. I am connecting to MySql.

Any help is appreciated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 2:26 am 
Now you write money and not just amount. It means a currency is also relevant. This is a typical situation where you define your own value type holding the amount and the currency.


Best reards,

Henrik Dahl


Top
  
 
 Post subject:
PostPosted: Thu Nov 03, 2005 11:50 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
NHibernate uses DbType.Currency. I believe ADO.NET will return a System.Data.SqlTypes.SqlMoney, which can be used with Decimal or Double. It's standard ADO.NET stuff at this point.


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.