-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Mapping to ms sql server 2005 sql_variant type
PostPosted: Tue Apr 22, 2008 6:28 am 
Newbie

Joined: Tue Apr 22, 2008 6:19 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Support for SQL_Variant
PostPosted: Fri Aug 01, 2008 4:45 pm 
Newbie

Joined: Fri Aug 01, 2008 4:43 pm
Posts: 1
Does hibernate support this at all?

I need to do exactly what Gareth attempted to do.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.