When I map my SQL Server 2008 R2 field decimal(18,2), Scale and Precision 
are always 0 and PrecisionDefined always false.
Is this working?
Nhibernate 3.3.1.4000

Map Class
Map(x => x.dec).Column("dec").Precision(18).Scale(2);

code to check datatype after Repostory created
 var allDefindedClasses2 = _sessionFactory.GetClassMetadata(typeof(T));
 IClassMetadata metadata = allDefindedClasses2;/

 IType propertyType = metadata.GetPropertyType(propertyName);
 DoubleType dt = propertyType as DoubleType; //numeric
                if (dt != null)
                {
                    if (dt.SqlType.PrecisionDefined)
                    {
                        byte temp = dt.SqlType.Precision;
                        byte temp2 = dt.SqlType.Scale;
                    }
                    
                }

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/IEcepwN2aagJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to