db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r452987 - in /db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql: NullCollectionsAndContainsMethod.java NullCollectionsAndIsEmpty.java
Date Wed, 04 Oct 2006 19:36:16 GMT
Author: mbo
Date: Wed Oct  4 12:36:15 2006
New Revision: 452987

URL: http://svn.apache.org/viewvc?view=rev&rev=452987
Log:
JDO-426: update both sides of the employee<->project relationship

Modified:
    db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java
    db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java

Modified: db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java
URL: http://svn.apache.org/viewvc/db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java?view=diff&rev=452987&r1=452986&r2=452987
==============================================================================
--- db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java
(original)
+++ db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndContainsMethod.java
Wed Oct  4 12:36:15 2006
@@ -16,6 +16,8 @@
 
 package org.apache.jdo.tck.query.jdoql;
 
+import java.util.Iterator;
+
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
 import org.apache.jdo.tck.pc.company.Employee;
@@ -126,6 +128,9 @@
         loadAndPersistCompanyModel(getPM());
         getPM().currentTransaction().begin();
         Employee emp1 = (Employee) getPersistentCompanyModelInstance("emp1");
+        for (Iterator itr = emp1.getProjects().iterator(); itr.hasNext();) {
+            ((Project) itr.next()).removeMember(emp1); 
+        }
         emp1.setProjects(null);
         getPM().currentTransaction().commit();
     }

Modified: db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java
URL: http://svn.apache.org/viewvc/db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java?view=diff&rev=452987&r1=452986&r2=452987
==============================================================================
--- db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java
(original)
+++ db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/query/jdoql/NullCollectionsAndIsEmpty.java
Wed Oct  4 12:36:15 2006
@@ -16,9 +16,12 @@
 
 package org.apache.jdo.tck.query.jdoql;
 
+import java.util.Iterator;
+
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
 import org.apache.jdo.tck.pc.company.Employee;
+import org.apache.jdo.tck.pc.company.Project;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -98,6 +101,9 @@
         loadAndPersistCompanyModel(getPM());
         getPM().currentTransaction().begin();
         Employee emp1 = (Employee) getPersistentCompanyModelInstance("emp1");
+        for (Iterator itr = emp1.getProjects().iterator(); itr.hasNext();) {
+            ((Project) itr.next()).removeMember(emp1); 
+        }
         emp1.setProjects(null);
         getPM().currentTransaction().commit();
     }



Mime
View raw message