Added an important little detail about non-inverse lists
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@8624 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
1ebf3f95e5
commit
e3c6fe2ba4
|
@ -294,7 +294,7 @@ create table Address ( addressId bigint not null primary key )
|
|||
<sect1 id="assoc-bidirectional" revision="1">
|
||||
<title>Bidirectional associations</title>
|
||||
|
||||
<sect2 id="assoc-bidirectional-m21" revision="1">
|
||||
<sect2 id="assoc-bidirectional-m21" revision="2">
|
||||
<title>one to many / many to one</title>
|
||||
|
||||
<para>
|
||||
|
@ -355,6 +355,15 @@ create table Address ( addressId bigint not null primary key )
|
|||
</list>
|
||||
</class>]]></programlisting>
|
||||
|
||||
<para>
|
||||
It is important that you define <literal>not-null="true"</literal> on the
|
||||
<literal><key></literal> element of the collection mapping if the
|
||||
underlying foreign key column is <literal>NOT NULL</literal>. Don't only
|
||||
declare <literal>not-null="true"</literal> on a possible nested
|
||||
<literal><column></literal> element, but on the <literal><key></literal>
|
||||
element.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="assoc-bidirectional-121">
|
||||
|
|
Loading…
Reference in New Issue