The docs explicitly state that Hibernate doesn't "currently" support bidirectional one-to-many with Map at the many-valued end. However, it appears to work fine with 2.1.1 -- even with a composite-index. (The collection retrieval selects the index column twice, but this appears to be harmless.) Is this just a case of the docs being out-of-date?
Here's a flavor of what I'm doing:
<map name="Addresses" lazy="true" inverse="true" cascade="all-delete-orphan">
<key column="pat_id_fk"/>
<composite-index class="AddrType">
<key-property name="Id" column="addr_typ_cd"/>
</composite-index>
<one-to-many class="Address"/>
</map>
-Tuyen
|