Hi. I'm having problems mapping a ternary association. I have 3 classes: Product, Notification and Subscriber. For a given Product and Subscriber, I want a list (or better, a set) of Subscribers. I thought of modeling this as a <map> in Product as following:
Code:
<class name="IProduct" table="Product" lazy="true">
(snip...)
<map name="notifications" table="NotificationSubscription" lazy="true" inverse="false">
<key column="producto"/>
<index-many-to-many class="ISubscriber" column="subscriber"/>
<many-to-many class="INotification" column="notification"/>
</map>
</class>
but it seems this mapping is only good for getting
one Subscriber (given the Product and the Subscriber, which is the key of the map)
So, how do I model this association? I'd really really like to use <map> since it's much easier than sets of composite-elements or things like that...
Of course I have ISubscriber and INotification correctly mapped.
I'm using NHibernate 1.0.1.0 with MSSQL 2000
TIA
Mauro