I am encoutering an issue with the decimal type and fluent nhibernate.
Here is my problem:
I have a class with a property:
public virtual decimal? Amount { get; set; }
In my mapping I have :
Map(x => x.Amount, "SOMETHING").Length(8).Precision(19).Scale(4).CustomSqlType("money");
The Nhibernate mapping I get is:
<property name="Amount" type="System.Nullable`1[[System.Decimal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<column name="SOMETHING" length="8" sql-type="money" precision="19" scale="4" />
</property>
And what I get when I try to update this value with a sql server 2000 is:
Disallowed implicit conversion from data type varchar to data type money, table 'ANYTABLE, column '...'. Use the CONVERT function to run this query.
I am using MsSqlConfiguration.MsSql2000 to configure fluent hibernate and version 1.1.0.0 of fluent nhibernate.
Thanks for your help!