Many-to-many mapping with extra columns in join table

前端 未结 5 1030
慢半拍i
慢半拍i 2021-01-22 00:51

Here is the domain that I wish to have:

public class Person
{
    public int Id { get; set; }
    public IList AcquiredCertificates {          


        
5条回答
  •  孤街浪徒
    2021-01-22 01:33

    By design, NHibernate only supports the implicit many-to-many mapping if there is absolutely NOTHING other than the pair of FKs represented in the intermediate (middle) table that holds the many-to-many relationship.

    Some time ago, Billy McCafferty blogged about this exact 'issue' (not really an issue since its BY DESIGN)...

    http://devlicio.us/blogs/billy_mccafferty/archive/2008/07/11/when-to-use-many-to-one-s-vs-many-to-many-with-nhibernate.aspx

提交回复
热议问题