I'm looking forward to generate our database script by using the script generated by nHibernate. We use Fluent nHibernate to create our mapping.
In our original database design, there is a few xml columns that use the following schema:
CREATE XML SCHEMA COLLECTION LocalizedValue AS
N'<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Values">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Culture" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>'
And when we want to use it, we define our column like this (sample table):
CREATE TABLE Plans( PlanId int IDENTITY(1,1) NOT NULL, [Name] xml(CONTENT [dbo].[LocalizedValue]) NULL )
How can I achieve such feature by using nHibernate and/or Fluent nHibernate?