cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1207109 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java
Date Mon, 28 Nov 2011 12:40:51 GMT
Author: aadamchik
Date: Mon Nov 28 12:40:50 2011
New Revision: 1207109

URL: http://svn.apache.org/viewvc?rev=1207109&view=rev
Log:
CAY-1624 [PATCH] PersistentObjectHolder throws NPE is object is transient - not in an ObjectContext

patch by John Huss

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1207109&r1=1207108&r2=1207109&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Mon Nov 28 12:40:50 2011
@@ -29,6 +29,7 @@ Bug Fixes Since 3.1M3:
 CAY-1477 Modeler: Better validation for erroneous horizontal inheritance mapping
 CAY-1513 Deadlock in PoolManager
 CAY-1623 [PATCH] PersistentObjectList.setValue does not work
+CAY-1624 [PATCH] PersistentObjectHolder throws NPE is object is transient - not in an ObjectContext
 CAY-1627 CayenneModeler: collection types for to-many relationships are not saved
 CAY-1628 ClassCastException when using java.util.Set or java.util.Map as collection type
for to-many relationship
 CAY-1631 Oracle - passing blobs as stored procedure parameters

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java?rev=1207109&r1=1207108&r2=1207109&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/PersistentObjectHolder.java
Mon Nov 28 12:40:50 2011
@@ -86,7 +86,7 @@ public class PersistentObjectHolder exte
         }
 
         Object oldValue = setValueDirectly(value);
-        if (oldValue != value) {
+        if (oldValue != value && relationshipOwner.getObjectContext() != null) {
             relationshipOwner.getObjectContext().propertyChanged(relationshipOwner, relationshipName,
oldValue, value);
     
             if (oldValue instanceof Persistent) {



Mime
View raw message