0
映射一對多關係時,我得到這個異常。我的映射XML看起來是這樣的:nHibernate一對多映射問題
<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).
請告訴我什麼是怎麼回事。 謝謝, 雷迪
編輯:對不起鄉親,這是一個錯字,我發現它張貼我的問題......怪異的後....