doc'd <timestamp use-db="true|false"/>
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@7738 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
207f54a546
commit
d3c6b9fd42
|
@ -1133,7 +1133,7 @@
|
|||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="mapping-declaration-timestamp">
|
||||
<sect2 id="mapping-declaration-timestamp" revision="1" >
|
||||
<title>timestamp (optional)</title>
|
||||
|
||||
<para>
|
||||
|
@ -1149,6 +1149,7 @@
|
|||
<area id="timestamp2" coords="3 70" />
|
||||
<area id="timestamp3" coords="4 70" />
|
||||
<area id="timestamp4" coords="5 70" />
|
||||
<area id="timestamp5" coords="6 70" />
|
||||
</areaspec>
|
||||
<programlisting><![CDATA[<timestamp
|
||||
column="timestamp_column"
|
||||
|
@ -1156,6 +1157,7 @@
|
|||
access="field|property|ClassName"
|
||||
unsaved-value="null|undefined"
|
||||
node="element-name|@attribute-name|element/@attribute|."
|
||||
use-db="true|false"
|
||||
/>]]></programlisting>
|
||||
<calloutlist>
|
||||
<callout arearefs="timestamp1">
|
||||
|
@ -1186,12 +1188,26 @@
|
|||
property value should be used.)
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="timestamp5">
|
||||
<para>
|
||||
<literal>use-db</literal> (optional - defaults to <literal>false</literal>):
|
||||
Should Hibernate use JVM-based timestamp values, or database-based
|
||||
timestamp values? Database-based timestamps incur an overhead because
|
||||
Hibernate must hit the database in order to determine the "next value",
|
||||
but will be safer for use in clustered environments. Note also, that not
|
||||
all <literal>Dialect</literal>s are known to support retreiving of the
|
||||
database's current timestamp, while others might be unsafe for usage
|
||||
due to lack of precision (Oracle 8 for example).
|
||||
</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
</programlistingco>
|
||||
|
||||
<para>
|
||||
Note that <literal><timestamp></literal> is equivalent to
|
||||
<literal><version type="timestamp"></literal>.
|
||||
<literal><version type="timestamp"></literal>. And
|
||||
<literal><timestamp use-db="true"></literal> is equivalent to
|
||||
<literal><version type="dbtimestamp"></literal>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
|
|
Loading…
Reference in New Issue