You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2014/05/01 13:02:46 UTC
svn commit: r907605 - in /websites/staging/isis/trunk: cgi-bin/ content/
content/components/objectstores/jdo/managed-1-to-m-relationships.html
Author: buildbot
Date: Thu May 1 11:02:46 2014
New Revision: 907605
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/managed-1-to-m-relationships.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu May 1 11:02:46 2014
@@ -1 +1 @@
-1591598
+1591600
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu May 1 11:02:46 2014
@@ -1 +1 @@
-1591598
+1591600
Modified: websites/staging/isis/trunk/content/components/objectstores/jdo/managed-1-to-m-relationships.html
==============================================================================
--- websites/staging/isis/trunk/content/components/objectstores/jdo/managed-1-to-m-relationships.html (original)
+++ websites/staging/isis/trunk/content/components/objectstores/jdo/managed-1-to-m-relationships.html Thu May 1 11:02:46 2014
@@ -365,7 +365,7 @@
<p>Contrast the above with the programmatic maintenance described in the <a href="../../../more-advanced-topics/how-to-04-060-How-to-set-up-and-maintain-bidirectional-relationships.html">how-to</a>.</p>
-<p>If you use Eclipse as your IDE, then these <a href="../../../intro/resources/editor-templates.html">editor templates</a> include a set (prefixed <code>isjd</code>) to help write such code.</p>
+<p>If you use Eclipse or IntelliJ as your IDE, then these <a href="../../../intro/resources/editor-templates.html">editor templates</a> include a set (prefixed <code>isjd</code> or <code>isc.jd</code>) to help write such code.</p>
<blockquote>
<p><strong>Note</strong></p>
@@ -377,6 +377,12 @@
<p>The upshot is that you should NEVER programmatically add the child object to the parent's collection if using JDO Objectstore.</p>
</blockquote>
+<h3>Add to the Parent, not the Child</h3>
+
+<p>One further hint: when having a bidirectional 1-n relationship that must be automatically managed by DataNucleus, it's preferred to "add" to the parent's child collection, than set the parent on the child.</p>
+
+<p>If you don't do this then you may (as of Isis 1.4.1) hit an NullPointerException. This may be a bug in DN, we are not completely sure, but the above idiom seems to fix the issue. For more information, see <a href="http://isis.markmail.org/thread/ipu2lzqqikqdglox">this thread</a> on the Isis users mailing list, including this <a href="http://markmail.org/message/hblptpw675mlw723">message</a> with the above recommendation.</p>
+
</div>