Questo contenuto non è disponibile nella lingua selezionata.
6.3.3. Bidirectional associations with indexed collections
A bidirectional association where one end is represented as a
<list>
or <map>
, requires special consideration. If there is a property of the child class that maps to the index column you can use inverse="true"
on the collection mapping:
If there is no such property on the child class, the association cannot be considered truly bidirectional. That is, there is information available at one end of the association that is not available at the other end. In this case, you cannot map the collection
inverse="true"
. Instead, you could use the following mapping:
Note that in this mapping, the collection-valued end of the association is responsible for updates to the foreign key.