I have 2 entities Users and Colors. One user may be associated with multiple colors, and one color may be associated with multiple users. I use FluentNHibernate autopersistence model to generate the database. Now I have to add to the generated table UserToColor(UserId,ColorId) also an extra field 'CreatedOn', how can I accomplish and is this accomplishable with fluent-nhibernate?
Asked
Active
Viewed 348 times
2
-
duplicate: http://stackoverflow.com/questions/166426/additional-fields-in-nhibernate-many-to-many-relation-tables – Mauricio Scheffer Nov 26 '10 at 17:51
1 Answers
3
NHibernate doesn't support this. The best workaround is to create an extra class as a link table, and have a many to one relationship to it from each of your existing classes.

James L
- 16,456
- 10
- 53
- 70