I am used to hbm files and have started using fluent nhibernate recently.
Creating an m-to-m relationship between two entities A and B is quite simple
In entity A, I create:
public virtual IList<B> Bs { get; set; }
and then I use:
mapping.HasManyToMany(x => x.Bs);
That’s it and I can do:
A a = new A();
a.Bs.Add(b);
My problem is that I would like to have an additional column in my dedicated m-to-m database table which holds the two foreign keys. What is the simplest way to achieve this in FNH?
Would I have to create a dedicated entity for the m-to-m realtionship or is there a simpler solution?