cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r504524 - /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java
Date Wed, 07 Feb 2007 12:30:11 GMT
Author: aadamchik
Date: Wed Feb  7 04:30:11 2007
New Revision: 504524

URL: http://svn.apache.org/viewvc?view=rev&rev=504524
Log:
CAY-668: Link Cayenne callback API with JPA provider
(found a bug in the interceptor - PrePersist callback should be invoked in registerNewObject
as well as newObject)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java?view=diff&rev=504524&r1=504523&r2=504524
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/intercept/ObjectContextCallbackInterceptor.java
Wed Feb  7 04:30:11 2007
@@ -77,6 +77,14 @@
     }
 
     /**
+     * Registers a new object and performs a "PrePersist" callback on it.
+     */
+    public void registerNewObject(Object object) {
+        super.registerNewObject(object);
+        prePersist.performCallbacks(object);
+    }
+
+    /**
      * Deletes an object, applying "PreRemove" callbacks to it and all its cascaded
      * dependencies.
      */



Mime
View raw message