Ricardo, thanks for that! Could I ask you to show an example of how to do it? I cannot find anything related in the documentation.
Thanks, Michael. On Tuesday, August 19, 2014 9:09:32 PM UTC+10, Ricardo Peres wrote: > > You can mix both, that is, you can specify a convention for all properties > of type decimal on top of the hbm.xml mappings. > > RP > > On Tuesday, August 19, 2014 7:01:23 AM UTC+1, Michael Karmazin wrote: >> >> I'm upgrading a very large project from old-old-old NH2.0.0 to NH3.3.3. >> >> Apart from many other problems that are mainly solved, there is a change >> in decimal mapping behaviour: it seems that the default scale for decimal >> values in NH3.3.3 is 5, while the old one has at least 6. So when saving a >> decimal to the database, the old one saves 0.654321 as it is, while NH3.3.3 >> saves it as 0.654320. >> >> We're using hbm.xml mapping files. Of course it's possible to specifiy >> the scale and precision for every decimal property explicitly, but there >> are thousands properties in our classes in total and about 500 of them are >> decimal - so that could be quite a task. I'm wondering is there any >> resonable way to specify default presicision and scale for us? >> >> I already found the posts which suggest to go the ModelMapper way (e.g. >> http://stackoverflow.com/questions/15948439/nhibernate-map-all-decimals-with-the-same-precision-and-scale), >> >> but I cannot see how I can use it with hbm.xml files. >> >> Thanks, >> Michael. >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
