--- jdk1.5-test/org/apache/jdo/tck/query/delete/DeletePersistentAll.java 2006-08-29 18:18:56.000000000 -0700
+++ /Users/mprudhom/java/src/jdo/jdo/branches/2.0/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java 2006-08-29 14:23:25.000000000 -0700
@@ -17,7 +17,6 @@
package org.apache.jdo.tck.query.delete;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import org.apache.jdo.tck.JDO_Test;
@@ -27,11 +26,6 @@
import org.apache.jdo.tck.query.QueryTest;
import org.apache.jdo.tck.util.BatchTestRunner;
-import javax.jdo.PersistenceManager;
-import org.apache.jdo.tck.pc.company.Insurance;
-import org.apache.jdo.tck.pc.company.Employee;
-
-
/**
*Title: Delete Persistent All.
*
@@ -147,24 +141,5 @@
protected void localSetUp() {
addTearDownClass(CompanyModelReader.getTearDownClasses());
loadAndPersistCompanyModel(getPM());
-
- // ###BEA### http://issues.apache.org/jira/browse/JDO-411
- // added to fix non-nullible FKs before bulk deletes are attempted
- nullForeignKeyReferences(getPM());
- }
-
- // ###BEA### http://issues.apache.org/jira/browse/JDO-411
- // Insurance hold a foreign key to Person, and it isn't
- // expected that it should be automatically nulled or removed
- // if Person is removed, so prime the test case by first deleting
- // all the Insurance instances
- protected static void nullForeignKeyReferences(PersistenceManager pm)
- {
- pm.currentTransaction().begin();
- for (Iterator i = pm.getExtent(Insurance.class, true).iterator();
- i.hasNext(); ((Insurance) i.next()).setEmployee(null));
- for (Iterator i = pm.getExtent (Employee.class, true).iterator ();
- i.hasNext (); ((Employee)i.next ()).setMentor (null));
- pm.currentTransaction ().commit ();
}
}