2010-01-04 15 views
0

NHibernate的具有“可序列化”类型地图为序列的功能NHibernate

<property name="PropertyName" column="ColumnName" type="**Serializable**" /> 

有一个内置在功能NHibernate类型呢?

喜欢的东西

Map(x => x.PropertyName).CustomType<**SerializableType**>(); 

回答

0
Map(c => c.PropertyName).CustomType<NHibernate.Type.SerializableType>() 

似乎做它

+0

不错!愚蠢的我,我应该尝试过,但我想我认为在Fluent项目中有一个相同的东西。 – noah 2010-01-04 17:45:31

+0

编译但抛出Exception @ runtime – hackerhasid 2010-01-20 16:01:56

+0

@statichippo - 属性类型[[Serializable]]? – 2010-01-20 16:21:46

2

地图(C => c.PropertyName).CustomType( “串行化”);