Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
8.2.2. One-to-one
A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique constraint.
create table Person ( personId bigint not null primary key, addressId bigint not null unique ) create table Address ( addressId bigint not null primary key )
create table Person ( personId bigint not null primary key, addressId bigint not null unique )
create table Address ( addressId bigint not null primary key )
A unidirectional one-to-one association on a primary key usually uses a special id generator In this example, however, we have reversed the direction of the association:
create table Person ( personId bigint not null primary key ) create table Address ( personId bigint not null primary key )
create table Person ( personId bigint not null primary key )
create table Address ( personId bigint not null primary key )