Check out Ayendes example here: http://ayende.com/Blog/archive/2006/05/30/NHibernateAndXMLColumnTypes.aspx
he includes code in the bottom link. It's a little outdated, but is a good starting point. As you already found out, you'll need to tweak a couple things in NH source to get some nicities going (such as the schema export), which may include some dialect changes if I remember right. On Thursday, July 30, 2009, Mikael Henriksson <[email protected]> wrote: > Yay! It worked. Unfortunately it looks like I will have to update NHibernate > with RegisterColumnType(DbType.Xml, "XML"); unfortunately it complains about > pretty much everything when I build the NH source :( It's getting too late > for playing around with this kind of stuff! > <http://mail.google.com/mail/e/gtalk/325> > > 2009/7/30 James Gregory <[email protected]> > > > You'll need to use CustomTypeOf to specify that you want that particular > property to use the usertype, yes. > > On Thu, Jul 30, 2009 at 10:41 PM, Mikael Henriksson <[email protected]> > wrote: > Ok, so if I use something like : http://gist.github.com/47082 then I should > be able to map it properly or do I need to explicitly do something in the > mappings? Like CustomTypeOf<> somewhere in the fluent mappings? > > 2009/7/30 James Gregory <[email protected]> > > > > > > It's not an easy thing. This is specifically NHibernate, fluent doesn't > really come into it. You need to create an IUserType, there are some examples > out there; and Ayende has an entry on his blog about Xml columns. > > > > > > > On Thu, Jul 30, 2009 at 7:57 PM, Mikael Henriksson <[email protected]> > wrote: > > > > > > > I asked this in nhusers but I'll ask here too: > How would I go about mapping to and ms sql 2008 Xml column? > > > > > > > > > > > > > > > > > -- - Hudson http://www.bestguesstheory.com http://twitter.com/HudsonAkridge --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
