Questo contenuto non è disponibile nella lingua selezionata.
8.5. Bidirectional associations with join tables
8.5.1. one-to-many / many-to-one Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The following is an example of a bidirectional one-to-many association on a join table. The
inverse="true"
can go on either end of the association, on the collection, or on the join.
create table Person ( personId bigint not null primary key ) create table PersonAddress ( personId bigint not null, addressId bigint not null primary key ) create table Address ( addressId bigint not null primary key )
create table Person ( personId bigint not null primary key )
create table PersonAddress ( personId bigint not null, addressId bigint not null primary key )
create table Address ( addressId bigint not null primary key )