NHibernate Many-to-many with a boolean flag on the association table
- by Nigel
Hi
I am doing some work on an application that uses an existing schema that cannot be altered. Whilst writing my NHibernate mappings I encountered a strange many-to-many relationship. The relationship is defined in the standard way as in this question with the addition of a boolean flag on the association table that signifies if the relationship is legal. This seems somewhat redundant but as I say, cannot be changed.
Is it possible to define this relationship in Nhibernate without resorting to using a third class to represent the association? Perhaps by applying a filter?
Many thanks.