Hi, I need to use a many-to-many relation between two class, eg., A and B. So A has an IList<B> and B has an IList<A>. Moreover, this many-to-many relation is "provided" by a link table, that store, for each record, idA and idB. I create the mapping of A and B and all works.
Now I want to add a property on the link table, because I need a property on the association between A and B.
Which is the best practise in this case?
Have I to map the link table like an entity, or it is enough to store, both in A and B entity, also a list of <idOtherEntity,propertyOnTheLinkTable>? If the second option is right, how could I implement it in the mapping file?
Thank you very much
|