Author: buildbot
Date: Mon Jun 2 08:26:51 2014
New Revision: 910886
Log:
Staging update by buildbot for isis
Modified:
websites/staging/isis/trunk/cgi-bin/ (props changed)
websites/staging/isis/trunk/content/ (props changed)
websites/staging/isis/trunk/content/components/objectstores/jdo/disabling-persistence-by-reachability.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jun 2 08:26:51 2014
@@ -1 +1 @@
-1599119
+1599120
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jun 2 08:26:51 2014
@@ -1 +1 @@
-1599119
+1599120
Modified:
websites/staging/isis/trunk/content/components/objectstores/jdo/disabling-persistence-by-reachability.html
==============================================================================
---
websites/staging/isis/trunk/content/components/objectstores/jdo/disabling-persistence-by-reachability.html
(original)
+++
websites/staging/isis/trunk/content/components/objectstores/jdo/disabling-persistence-by-reachability.html
Mon Jun 2 08:26:51 2014
@@ -402,16 +402,14 @@
</h1>
</div>
-<p>JDO/DataNucleus supports the concept of <a
href="http://www.datanucleus.org/products/datanucleus/jdo/orm/cascading.html">persistence-by-reachability</a>.
That is, if
-a non-persistent entity is associated with an already-persistent entity, then
DataNucleus will detect this and will automatically persist the associated
object.</p>
+<p>By default, JDO/DataNucleus supports the concept of <a
href="http://www.datanucleus.org/products/datanucleus/jdo/orm/cascading.html">persistence-by-reachability</a>.
That is, if
+a non-persistent entity is associated with an already-persistent entity, then
DataNucleus will detect this and will automatically persist the associated
object. Put another way: there is no need to call Isis'
<code>DomainObjectContainer#persist(.)</code> or
<code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p>
-<p>Put another way: there is no need to call Isis'
<code>DomainObjectContainer#persist(.)</code> or
<code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p>
-
-<p>However, convenient though this feature is, you may find that it causes
performance issues.</p>
+<p>However, convenient though this feature is, <em>you may find that it causes
performance issues</em>.</p>
<p>One scenario in particular where this performance issues can arise is if
your entities implement the <code>java.lang.Comparable</code> interface, and
you have used Isis' <a
href="../../../reference/Utility.html">ObjectContracts</a> utility. The issue
here is that <code>ObjectContracts</code> implementation can cause DataNucleus
to recursively rehydrate a larger number of associated entities. (More detail
below).</p>
-<p>To disable persistence-by-reachability, add the following to
<code>persistor_datanucleus.properties</code>:</p>
+<p>We therefore <em>recommend that you disable
persistence-by-reachability</em>, add the following to
<code>persistor_datanucleus.properties</code>:</p>
<pre><code>#
# Require explicit persistence (since entities are Comparable and using
ObjectContracts#compareTo).
@@ -421,6 +419,8 @@ isis.persistor.datanucleus.impl.datanucl
<p>This change has been made to the <a
href="../../../intro/getting-started/simple-archetype.html">simple</a> and <a
href="../../../intro/getting-started/quickstart-archetype.html">quickstart</a>
archetypes (1.5.0-snapshot).</p>
+<p>If you do disable this feature, then you will (of course) need to ensure
that you explicitly persist all entities using the
<code>DomainObjectContainer#persist(.)</code> or
<code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p>
+
<h4>Explanation of the issue in more detail</h4>
<p>Consider the entities:</p>