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: currency mappings
PostPosted: Fri Oct 13, 2006 1:07 pm 
Newbie

Joined: Fri Apr 01, 2005 5:20 pm
Posts: 14
Hibernate version: latest
WinForms App
SQL Server 2000


Hi,

I am not sure if the is the right place for this posting, but I figured I would try here first.

I have some money fields in my SQL Server. I have them mapped as Decimal(19,4). I am writing a WinForms app and they show up with 4 places after the decimal. So it comes out like 12312.0000 which is how they look in the DB. I tried Decimal (19,2), but did not seem to matter. Is there away in the mapping file to make it only 2 decimal places? Or do I have to do this in the c# code?

Code:
    <property column="E2EachOccurrence" type="Decimal (19,2)" name="E2EachOccurrence" />
    <property column="E2Aggregate" type="Decimal (19,2)" name="E2Aggregate" />

_________________
Thanks,

John


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.