I have a map-based ternary association (let's say a table ABC linking tables A, B and C) and the following mapping:
Code:
<map name="myMap">
<key column="id_A"/>
<index-many-to-many column="id_B" class="..."/>
<many-to-many column="id_C" class="..."/>
</map>
Calling:
instanceOfA.getMyMap().get(instanceOfB)
works fine...but I do not understand why it always returns a
single object and not a collection (whose size possibly > 1) !
As in a ternary association the 3-uple (id_A, id_B, id_C) is the "semantic" primary key,
it seems obvious that there is possibly more than a single entry matching: (id_A, id_B, *):
instanceOfA.getMyMap().get(instanceOfB) => *
Therefore I would expect * as being a collection...Right ??
What could be a possible solution to handle collections at the C-side ?
Thanks in advance.