I have a SQL Server database that contains an xml column. I need to map that xml column to an expando object within my domain entity. I am using NHibernate. How do I extend NHibernate to accommodate this? I am assuming (I am new to NHibernate) that I have to override the implementation to get and set the xml data, but I don’t know how to do that in NHibernate.
Share
Thanks to Petr’s answer, I have come up with the following initial attempt at a user type to handle the expando. It works quite nicely and I can now offer client set properties for each of my objects. I set the properties that each object must have, and each client can then add their own properties to meet their needs.
One caveat – I am only setting this up for persistence purposes. Searching is not necessary in this app as all querying is done against a MongoDB database that has denormalized copies of the data.