问题
NHibernate has a "Serializable" type
<property name="PropertyName" column="ColumnName" type="**Serializable**" />
Is there a built in type for this in Fluent NHibernate?
Something like
Map(x => x.PropertyName).CustomType<**SerializableType**>();
??
回答1:
Map(c => c.PropertyName).CustomType<NHibernate.Type.SerializableType>()
seems to do it
回答2:
Map(c => c.PropertyName).CustomType("serializable");
来源:https://stackoverflow.com/questions/2000798/map-to-serializable-in-fluent-nhibernate