映射一对多关系时出现此异常。我的映射 xml 如下所示:
<set name="-----" generic="true" inverse="true" cascade="all" lazy="false">
<key column="Id" />
<one-to-many class="-----------,---------" />
</set>
和,
<many-to-one name="------" column="Id" not-null="true" class="---------,-------" />
和例外:
------ Test started: Assembly: ----------.dll ------
TestCase '-------.GetSchema' failed: NHibernate.MappingException : Could not determine type for: Iesi.Collections.Generic.ISet`1[[-----------, --------, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, for columns: NHibernate.Mapping.Column(--------)
at NHibernate.Mapping.SimpleValue.get_Type()
at NHibernate.Mapping.SimpleValue.IsValid(IMapping mapping)
at NHibernate.Mapping.Property.IsValid(IMapping mapping)
at NHibernate.Mapping.PersistentClass.Validate(IMapping mapping)
at NHibernate.Mapping.RootClass.Validate(IMapping mapping)
at NHibernate.Cfg.Configuration.Validate()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at in
0 passed, 1 failed, 0 skipped, took 4.20 seconds (NUnit 2.5.2).
请告诉我这里发生了什么。谢谢,雷迪
编辑:对不起,伙计们,这是一个错字,我在发布我的问题后发现它......奇怪......