I have a column (called "value" in a database with the type sql_variant. The C# object I need to map this to has a property ("Value") with the type System.Object.
The relevant part of my mapping file is:
<property name="Value" type="object" not-null="false">
<column name="value" sql-type="sql_variant" not-null="false" />
</property>
However, when compiling the mapping file, I get the error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'BNPP.H2H.Util.Test.NHibernateTestBase' threw an exception. ---> NHibernate.MappingException: property mapping has wrong number of columns: DocumentInstanceField_New.BNPP.H2H.Document.DocumentInstanceField_New type: Object
Has anyone any idea what I should be doing here? I've searched extensively, but can't find any reference to anyone using NHibernate with the sql_variant type in SQL Server.
thanks,
Gareth
|