This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Shown below is a sample struct that when mapped as a ValueObject owned by another class creates problems for the amount property which is of Decimal type. For some reason, setting the Amount property to 500 for example yields a value of -0.000000000000000002147483648000 in the database when the owning object is saved. Note that this does not occur when the struct is converted to a class. Is this a bug or is there a workaround? struct SimpleMoney{ private decimal _amount; public decimal Amount { get { return _amount; } set { _amount =value;}}} |
|
|
Could you provide us with a repro case for this problem? Ideally a small console program plus SQL CREATE TABLE scripts for the database. (You can attach a zip file via the Options tab, or email to ivan @ the obvious domain. Please strip out all binaries first.) Also please let us know which database you are using in case that's part of the issue. Thanks! |
|
|
Hi Ivan, please see the attached sample to reproduce the problem. The database scripts are in the DB folder. Please keep me updated. We are currently avoiding using structs with decimals in our project because of this issue. |
|
|
Hi Aaron, Thanks for the clear and simple repro sample. I have committed a candidate fix for this issue and it will be included in nightly builds dated 3 June 2009 and above, available after about 1430 GMT. Please let us know if you still see problems. |
|