NHibernate Mapping Breaks when upgrading to NHibernate 3.1

前端 未结 1 365
心在旅途
心在旅途 2021-01-23 20:53

I just recently upgraded to FluentNHibernate 1.2 which uses NHibernate 3.1. After upgrading some of my old mappings are not working. I\'ve been having a hard time figuring out w

相关标签:
1条回答
  • 2021-01-23 21:08

    You mapped ICollection<PracticeDrill> Drills with only one foreign key (.KeyColumn("PracticeId")), but it actually has a composite key. Therefore NH can't fine the PracticeDrill by its id.

    The whole mapping is a bit strange. Why using a reference class? If it is really necessary, why using a composite key?

    0 讨论(0)
提交回复
热议问题