mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-14 23:25:00 +00:00
doc'ed changes to generated attribute choices
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@8307 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
7bb80888ca
commit
4967606abd
@ -1057,7 +1057,7 @@
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="mapping-declaration-version" revision="3">
|
||||
<sect2 id="mapping-declaration-version" revision="4">
|
||||
<title>version (optional)</title>
|
||||
|
||||
<para>
|
||||
@ -1082,7 +1082,7 @@
|
||||
type="typename"
|
||||
access="field|property|ClassName"
|
||||
unsaved-value="null|negative|undefined"
|
||||
generated="true|false"
|
||||
generated="never|always"
|
||||
insert="true|false"
|
||||
node="element-name|@attribute-name|element/@attribute|."
|
||||
/>]]></programlisting>
|
||||
@ -1121,7 +1121,7 @@
|
||||
</callout>
|
||||
<callout arearefs="version6">
|
||||
<para>
|
||||
<literal>generated</literal> (optional - defaults to <literal>false</literal>):
|
||||
<literal>generated</literal> (optional - defaults to <literal>never</literal>):
|
||||
Specifies that this version property value is actually generated by the database.
|
||||
See the discussion of <xref linkend="mapping-generated">generated properties</xref>.
|
||||
</para>
|
||||
@ -1152,7 +1152,7 @@
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="mapping-declaration-timestamp" revision="2" >
|
||||
<sect2 id="mapping-declaration-timestamp" revision="3" >
|
||||
<title>timestamp (optional)</title>
|
||||
|
||||
<para>
|
||||
@ -1177,7 +1177,7 @@
|
||||
access="field|property|ClassName"
|
||||
unsaved-value="null|undefined"
|
||||
source="vm|db"
|
||||
generated="true|false"
|
||||
generated="never|always"
|
||||
node="element-name|@attribute-name|element/@attribute|."
|
||||
/>]]></programlisting>
|
||||
<calloutlist>
|
||||
@ -1223,7 +1223,7 @@
|
||||
</callout>
|
||||
<callout arearefs="timestamp6">
|
||||
<para>
|
||||
<literal>generated</literal> (optional - defaults to <literal>false</literal>):
|
||||
<literal>generated</literal> (optional - defaults to <literal>never</literal>):
|
||||
Specifies that this timestamp property value is actually generated by the database.
|
||||
See the discussion of <xref linkend="mapping-generated">generated properties</xref>.
|
||||
</para>
|
||||
@ -1240,7 +1240,7 @@
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="mapping-declaration-property" revision="3">
|
||||
<sect2 id="mapping-declaration-property" revision="4">
|
||||
<title>property</title>
|
||||
|
||||
<para>
|
||||
@ -1277,7 +1277,7 @@
|
||||
unique="true|false"
|
||||
not-null="true|false"
|
||||
optimistic-lock="true|false"
|
||||
generated="true|false"
|
||||
generated="never|insert|always"
|
||||
node="element-name|@attribute-name|element/@attribute|."
|
||||
index="index_name"
|
||||
unique_key="unique_key_id"
|
||||
@ -1356,7 +1356,7 @@
|
||||
</callout>
|
||||
<callout arearefs="property12">
|
||||
<para>
|
||||
<literal>generated</literal> (optional - defaults to <literal>false</literal>):
|
||||
<literal>generated</literal> (optional - defaults to <literal>never</literal>):
|
||||
Specifies that this property value is actually generated by the database.
|
||||
See the discussion of <xref linkend="mapping-generated">generated properties</xref>.
|
||||
</para>
|
||||
@ -3242,7 +3242,7 @@ public class Customer implements Serializable {
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="mapping-generated">
|
||||
<sect1 id="mapping-generated" revision="1">
|
||||
<title>Generated Properties</title>
|
||||
<para>
|
||||
Generated properties are properties which have their values generated by the
|
||||
@ -3260,6 +3260,22 @@ public class Customer implements Serializable {
|
||||
<xref linkend="mapping-declaration-property">simple properties</xref> can be marked as
|
||||
generated.
|
||||
</para>
|
||||
<para>
|
||||
<literal>never</literal> (the default) - means that the given property value
|
||||
is not generated within the database.
|
||||
</para>
|
||||
<para>
|
||||
<literal>insert</literal> - states that the given property value is generated on
|
||||
insert, but is not regenerated on subsequent updates. Things like created-date would
|
||||
fall into this category. Note that even thought
|
||||
<xref linkend="mapping-declaration-version">version</xref> and
|
||||
<xref linkend="mapping-declaration-timestamp">timestamp</xref> properties can
|
||||
be marked as generated, this option is not available there...
|
||||
</para>
|
||||
<para>
|
||||
<literal>always</literal> - states that the property value is generated both
|
||||
on insert and on update.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="mapping-database-object">
|
||||
|
Loading…
x
Reference in New Issue
Block a user