I need to map a column of xml data type. I think something like this might w开发者_如何学JAVAork but what type should i specify in type atribute? What is the coresponding C# data type to the postgres xml data type? (i need to write the mapping but the entities are not ready yet and might not be written by me)
<property name="XmlFoo" type="">
<column name="XmlFoo" sql-type="xml" />
</property>
What is the proper way to do the mapping?
Thanks for replies!
UPDATE:
It seems that the right type is StringClob which is a specific NHibernate Type. Using StringClob instead of just String allows it to have a size over 4k.
Have you tried:
<property name="XmlFoo" type="StringClob">
<column name="XmlFoo" sql-type="xml" />
</property>
Did you mean StringClob
?
The accepted answer (type="StringBlob"
) didn't work for me, and I see no reference to StringBlob
on nhibernate.info.
However, type="StringClob"
worked like a charm (albeit on SQL Server.)
精彩评论