Index: /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestSize.java
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestSize.java (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestSize.java (Arbeitskopie)
@@ -42,10 +42,14 @@
*/
package ctf.jdo.tc3x;
+import java.sql.Connection;
+import java.sql.SQLException;
+
import harness.CastorTestCase;
import harness.TestHarness;
import jdo.JDOCategory;
+import org.castor.jdo.util.JDOUtils;
import org.exolab.castor.jdo.Database;
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.PersistenceException;
@@ -89,14 +93,17 @@
}
public final void removeRecords() throws PersistenceException {
- _db.begin();
- OQLQuery oqlquery = _db.getOQLQuery(
- "SELECT object FROM " + Entity.class.getName() + " object");
- QueryResults enumeration = oqlquery.execute(true);
- while (enumeration.hasMore()) {
- _db.remove(enumeration.next());
+ Connection conn = null;
+ try {
+ conn = _category.getJDBCConnection();
+ conn.setAutoCommit(false);
+ conn.createStatement().executeUpdate("DELETE FROM tc3x_entity");
+ conn.commit();
+ } catch (SQLException ex) {
+ ex.printStackTrace();
+ } finally {
+ JDOUtils.closeConnection (conn);
}
- _db.commit();
}
public final void createRecords() throws PersistenceException {
Index: /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestAbsolute.java
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestAbsolute.java (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc3x/TestAbsolute.java (Arbeitskopie)
@@ -42,12 +42,16 @@
*/
package ctf.jdo.tc3x;
+import java.sql.Connection;
+import java.sql.SQLException;
+
import harness.CastorTestCase;
import harness.TestHarness;
import jdo.JDOCategory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.castor.jdo.util.JDOUtils;
import org.exolab.castor.jdo.Database;
import org.exolab.castor.jdo.OQLQuery;
@@ -87,14 +91,17 @@
}
public void removeRecords() throws PersistenceException {
- _db.begin();
- OQLQuery oqlquery = _db.getOQLQuery(
- "SELECT object FROM " + Entity.class.getName() + " object");
- QueryResults enumeration = oqlquery.execute(true);
- while (enumeration.hasMore()) {
- _db.remove(enumeration.next());
+ Connection conn = null;
+ try {
+ conn = _category.getJDBCConnection();
+ conn.setAutoCommit(false);
+ conn.createStatement().executeUpdate("DELETE FROM tc3x_entity");
+ conn.commit();
+ } catch (SQLException ex) {
+ ex.printStackTrace();
+ } finally {
+ JDOUtils.closeConnection (conn);
}
- _db.commit();
}
public void createRecords() throws PersistenceException {
Index: /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc8x/TestCircularRef.java
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc8x/TestCircularRef.java (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc8x/TestCircularRef.java (Arbeitskopie)
@@ -83,8 +83,8 @@
LOG.info("Delete everything");
Statement stmt = _conn.createStatement();
- stmt.executeUpdate("delete from circ_brother");
- stmt.executeUpdate("delete from circ_sister");
+ stmt.executeUpdate("delete from tc8x_circ_brother");
+ stmt.executeUpdate("delete from tc8x_circ_sister");
_conn.commit();
}
Index: /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc9x/TestPolymorphismDegenerated.java
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc9x/TestPolymorphismDegenerated.java (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/java/ctf/jdo/tc9x/TestPolymorphismDegenerated.java (Arbeitskopie)
@@ -87,7 +87,7 @@
String oql = "select o from " + Subscription.class.getName()
+ " o where o.customer = 2";
- QueryResults qrs = db.getOQLQuery(oql).execute();
+ QueryResults qrs = db.getOQLQuery(oql).execute(true);
assertEquals(2, qrs.size());
Index: /home/ralf/Workspace/castor-2/cpactf/src/old/ddl/oracle.sql
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/ddl/oracle.sql (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/ddl/oracle.sql (Arbeitskopie)
@@ -152,6 +152,15 @@
create unique index tc1x_pks_person_pk on tc1x_pks_person( fname, lname );
+drop table tc1x_pks_only;
+
+create table tc1x_pks_only(
+ fname varchar(15) not null,
+ lname varchar(15) not null
+);
+
+create unique index tc1x_pks_only_pk on tc1x_pks_only( fname, lname );
+
drop table tc1x_pks_employee;
create table tc1x_pks_employee (
@@ -332,6 +341,10 @@
create unique index tc2x_keygen_string_pk on tc2x_keygen_string ( id );
+drop sequence tc2x_keygen_string_seq;
+
+create sequence tc2x_keygen_string_seq;
+
drop table tc2x_keygen_ext_string;
create table tc2x_keygen_ext_string (
id varchar(200) not null,
@@ -704,7 +717,25 @@
-- grant all on tc8x_pks_category to test;
+drop table tc8x_circ_brother;
+drop table tc8x_circ_sister;
+drop sequence tc8x_circ_brother_seq;
+drop sequence tc8x_circ_sister_seq;
+create table tc8x_circ_brother (
+ brother_id int not null PRIMARY KEY,
+ brother_sibling int
+);
+
+create sequence tc8x_circ_brother_seq;
+
+create table tc8x_circ_sister (
+ sister_id int not null PRIMARY KEY,
+ sister_sibling int
+);
+
+create sequence tc8x_circ_sister_seq;
+
-- base class
drop table test_rel_person;
Index: /home/ralf/Workspace/castor-2/cpactf/src/old/resources/tests.xml
===================================================================
--- /home/ralf/Workspace/castor-2/cpactf/src/old/resources/tests.xml (Revision 7545)
+++ /home/ralf/Workspace/castor-2/cpactf/src/old/resources/tests.xml (Arbeitskopie)
@@ -450,9 +450,9 @@
-
-
-
+
+
+