views:

557

answers:

1

I have some columns in my database (MS SQL Server 2005) which use the data type XML.

Can these be mapped as XML objects in NHibernate? My app is .NET 3.5 so I have access to both XDocument and XmlDocument which I can use but I don't know whether NHibernate will support it.

If it doesn't does anyone have a good suggestion on how to support it?

+2  A: 

Search google://"site:ayende.com NHibernateAndXMLColumnTypes"

-or-

For transparent XML serialization:

<class name="Foo">
  <!-- ... -->
  <property name="Bar" type="DataAccess.NHibernate.Types.XmlSerializedType`1[[DomainModel.Bar, DomainModel]], DataAccess" />
</class>
uvw
Slace
@Slace, that code doesn't compile, is SqlXmlType another custom type?
row1