NHibernate Many-to-many with boolean flag on association table

I am doing some work on an application that uses an existing schema that cannot be changed. While writing my NHibernate mappings, I came across a strange many-to-many relationship. A link is defined in a standard way, as in this question , with the addition of a boolean flag in the association table, which means the link is legal. It seems a little overkill, but as I say, it cannot be changed.

Is it possible to define this association in Nhibernate without resorting to using a third class to represent the association? Perhaps applying a filter?

Many thanks.

+2


a source to share


1 answer


This is what I ran into with NHibernate and keep coming back to the following resources. This article explains how you can create a Many-to-Many association and This question shows how you can create a filter on your Many-to-Many without having to map the actual association class.



+4


a source







All Articles