cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [1/4] cayenne git commit: fix DBCleaner for Derby
Date Sat, 22 Nov 2014 10:44:41 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 583df135b -> 177a25bd8


fix DBCleaner for Derby


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/df3494b6
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/df3494b6
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/df3494b6

Branch: refs/heads/master
Commit: df3494b6b57adf5c92dd4c061e8c243f0d7c588d
Parents: 583df13
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Wed Nov 19 15:44:11 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Wed Nov 19 15:44:11 2014 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/dba/JdbcPkGenerator.java |  30 ++---
 .../DataContextEJBQLConditionsPeopleIT.java     |   9 ++
 .../access/DataContextEJBQLInheritanceIT.java   |  10 ++
 .../access/SingleTableInheritanceIT.java        |   9 ++
 .../cayenne/unit/di/server/DBCleaner.java       | 115 ++++++++++---------
 .../util/DeepMergeOperationInheritanceIT.java   |   4 +
 6 files changed, 106 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
index 968b8a1..1866944 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
@@ -19,19 +19,6 @@
 
 package org.apache.cayenne.dba;
 
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.ObjectId;
@@ -45,6 +32,19 @@ import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.util.IDUtil;
 
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
 /**
  * Default primary key generator implementation. Uses a lookup table named
  * "AUTO_PK_SUPPORT" to search and increment primary keys for tables.
@@ -76,7 +76,9 @@ public class JdbcPkGenerator implements PkGenerator {
         }
 
         // delete any existing pk entries
-        runUpdate(node, pkDeleteString(dbEntities));
+        if (!dbEntities.isEmpty()) {
+            runUpdate(node, pkDeleteString(dbEntities));
+        }
 
         // insert all needed entries
         for (DbEntity ent : dbEntities) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsPeopleIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsPeopleIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsPeopleIT.java
index c83399f..73da8a3 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsPeopleIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLConditionsPeopleIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.testdo.inheritance_people.Address;
 import org.apache.cayenne.testdo.inheritance_people.Department;
 import org.apache.cayenne.testdo.inheritance_people.Manager;
 import org.apache.cayenne.unit.di.server.CayenneProjects;
+import org.apache.cayenne.unit.di.server.DBCleaner;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Before;
@@ -50,6 +51,13 @@ public class DataContextEJBQLConditionsPeopleIT extends ServerCase {
     @Inject
     private ObjectContext context;
 
+    @Inject
+    protected DBCleaner dbCleaner;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+    }
+
     @Before
     public void testSetUp() throws Exception {
 
@@ -64,6 +72,7 @@ public class DataContextEJBQLConditionsPeopleIT extends ServerCase {
 
         // manually break circular deps
         tPerson.update().set("DEPARTMENT_ID", null, Types.INTEGER).execute();
+        dbCleaner.clean();
 
         // TODO: use TableHelper to create test data
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLInheritanceIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLInheritanceIT.java
index 3d5b01e..e39fe21 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLInheritanceIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.testdo.inheritance_people.CustomerRepresentative;
 import org.apache.cayenne.testdo.inheritance_people.Employee;
 import org.apache.cayenne.testdo.inheritance_people.Manager;
 import org.apache.cayenne.unit.di.server.CayenneProjects;
+import org.apache.cayenne.unit.di.server.DBCleaner;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Before;
@@ -46,11 +47,20 @@ public class DataContextEJBQLInheritanceIT extends ServerCase {
     @Inject
     protected DBHelper dbHelper;
 
+    @Inject
+    protected DBCleaner dbCleaner;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+    }
+
     @Before
     public void testSetUp() throws Exception {
         // manually break circular deps
         dbHelper.update("PERSON").set("DEPARTMENT_ID", null, Types.INTEGER).execute();
 
+        dbCleaner.clean();
+
         TableHelper person = new TableHelper(dbHelper, "PERSON");
         person.setColumns("PERSON_ID", "NAME", "PERSON_TYPE", "SALARY").setColumnTypes(Types.INTEGER,
Types.VARCHAR,
                 Types.CHAR, Types.FLOAT);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
index d17e15e..41f9446 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
@@ -39,6 +39,7 @@ import org.apache.cayenne.testdo.inheritance_people.PersonNotes;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.CayenneProjects;
+import org.apache.cayenne.unit.di.server.DBCleaner;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Before;
@@ -60,6 +61,9 @@ public class SingleTableInheritanceIT extends ServerCase {
     private DBHelper dbHelper;
 
     @Inject
+    private DBCleaner dbCleaner;
+
+    @Inject
     private DataContext context;
 
     @Inject
@@ -73,6 +77,10 @@ public class SingleTableInheritanceIT extends ServerCase {
     private TableHelper tClientCompany;
     private TableHelper tDepartment;
 
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+    }
+
     @Before
     public void testSetUp() throws Exception {
         tPerson = new TableHelper(dbHelper, "PERSON");
@@ -101,6 +109,7 @@ public class SingleTableInheritanceIT extends ServerCase {
 
         // manually break circular deps
         tPerson.update().set("DEPARTMENT_ID", null, Types.INTEGER).execute();
+        dbCleaner.clean();
     }
 
     private void create2PersonDataSet() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/DBCleaner.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/DBCleaner.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/DBCleaner.java
index d44ac87..3bd680c 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/DBCleaner.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/DBCleaner.java
@@ -39,23 +39,22 @@ public class DBCleaner {
 
     public void clean() throws SQLException {
         if (location.equals(CayenneProjects.TESTMAP_PROJECT)) {
-            dbHelper.deleteAll("ARTGROUP");
-            dbHelper.deleteAll("ARTIST");
-            dbHelper.deleteAll("ARTIST_CT");
+            dbHelper.deleteAll("PAINTING_INFO");
+            dbHelper.deleteAll("PAINTING");
+            dbHelper.deleteAll("PAINTING1");
             dbHelper.deleteAll("ARTIST_EXHIBIT");
             dbHelper.deleteAll("ARTIST_GROUP");
+            dbHelper.deleteAll("ARTIST");
+            dbHelper.deleteAll("ARTGROUP");
             dbHelper.deleteAll("EXHIBIT");
             dbHelper.deleteAll("GALLERY");
+            dbHelper.deleteAll("ARTIST_CT");
             dbHelper.deleteAll("GENERATED_COLUMN");
             dbHelper.deleteAll("NULL_TEST");
-            dbHelper.deleteAll("PAINTING");
-            dbHelper.deleteAll("PAINTING1");
-            dbHelper.deleteAll("PAINTING_INFO");
         } else if (location.equals(CayenneProjects.MULTI_TIER_PROJECT)) {
-            dbHelper.deleteAll("MT_JOIN45");
-            dbHelper.deleteAll("MT_TABLE1");
             dbHelper.deleteAll("MT_TABLE2");
-            dbHelper.deleteAll("MT_TABLE3");
+            dbHelper.deleteAll("MT_TABLE1");
+            dbHelper.deleteAll("MT_JOIN45");
             dbHelper.deleteAll("MT_TABLE4");
             dbHelper.deleteAll("MT_TABLE5");
         } else if (location.equals(CayenneProjects.COMPOUND_PROJECT)) {
@@ -65,13 +64,15 @@ public class DBCleaner {
             dbHelper.deleteAll("COMPOUND_PK_TEST");
         } else if (location.equals(CayenneProjects.PEOPLE_PROJECT)) {
             dbHelper.deleteAll("ADDRESS");
-            dbHelper.deleteAll("CLIENT_COMPANY");
             dbHelper.deleteAll("DEPARTMENT");
-            dbHelper.deleteAll("PERSON");
             dbHelper.deleteAll("PERSON_NOTES");
-        } else if(location.equals(CayenneProjects.BINARY_PK_PROJECT)) {
-            dbHelper.deleteAll("BINARY_PK_TEST1");
-            dbHelper.deleteAll("BINARY_PK_TEST2");
+            dbHelper.deleteAll("PERSON");
+            dbHelper.deleteAll("CLIENT_COMPANY");
+        } else if (location.equals(CayenneProjects.BINARY_PK_PROJECT)) {
+            if (accessStackAdapter.supportsBinaryPK()) {
+                dbHelper.deleteAll("BINARY_PK_TEST2");
+                dbHelper.deleteAll("BINARY_PK_TEST1");
+            }
         } else if (location.equals(CayenneProjects.DATE_TIME_PROJECT)) {
             dbHelper.deleteAll("CALENDAR_TEST");
             dbHelper.deleteAll("DATE_TEST");
@@ -89,67 +90,67 @@ public class DBCleaner {
         } else if (location.equals(CayenneProjects.EXTENDED_TYPE_PROJECT)) {
             dbHelper.deleteAll("EXTENDED_TYPE_TEST");
         } else if (location.equals(CayenneProjects.GENERATED_PROJECT)) {
-            dbHelper.deleteAll("GENERATED_COLUMN_COMP_KEY");
-            dbHelper.deleteAll("GENERATED_COLUMN_COMP_M");
+            dbHelper.deleteAll("GENERATED_JOIN");
+            dbHelper.deleteAll("GENERATED_F1");
+            dbHelper.deleteAll("GENERATED_F2");
             dbHelper.deleteAll("GENERATED_COLUMN_DEP");
             dbHelper.deleteAll("GENERATED_COLUMN_TEST");
             dbHelper.deleteAll("GENERATED_COLUMN_TEST2");
-            dbHelper.deleteAll("GENERATED_F1");
-            dbHelper.deleteAll("GENERATED_F2");
-            dbHelper.deleteAll("GENERATED_JOIN");
+            dbHelper.deleteAll("GENERATED_COLUMN_COMP_KEY");
+            dbHelper.deleteAll("GENERATED_COLUMN_COMP_M");
         } else if (location.equals(CayenneProjects.GENERIC_PROJECT)) {
-            dbHelper.deleteAll("GENERIC1");
             dbHelper.deleteAll("GENERIC2");
+            dbHelper.deleteAll("GENERIC1");
         } else if (location.equals(CayenneProjects.INHERITANCE_PROJECT)) {
             dbHelper.deleteAll("BASE_ENTITY");
             dbHelper.deleteAll("DIRECT_TO_SUB_ENTITY");
             dbHelper.deleteAll("RELATED_ENTITY");
         } else if (location.equals(CayenneProjects.INHERITANCE_SINGLE_TABLE1_PROJECT)) {
             dbHelper.deleteAll("GROUP_MEMBERS");
+            dbHelper.deleteAll("USER_PROPERTIES");
             dbHelper.deleteAll("GROUP_PROPERTIES");
             dbHelper.deleteAll("ROLES");
-            dbHelper.deleteAll("USER_PROPERTIES");
         } else if (location.equals(CayenneProjects.INHERITANCE_VERTICAL_PROJECT)) {
-            dbHelper.deleteAll("IV1_ROOT");
+            dbHelper.deleteAll("IV_SUB1_SUB1");
+            dbHelper.deleteAll("IV_SUB1");
+            dbHelper.deleteAll("IV_SUB2");
+            dbHelper.deleteAll("IV_ROOT");
             dbHelper.deleteAll("IV1_SUB1");
-            dbHelper.deleteAll("IV2_ROOT");
+            dbHelper.deleteAll("IV1_ROOT");
             dbHelper.deleteAll("IV2_SUB1");
+            dbHelper.deleteAll("IV2_ROOT");
             dbHelper.deleteAll("IV2_X");
-            dbHelper.deleteAll("IV_ROOT");
-            dbHelper.deleteAll("IV_SUB1");
-            dbHelper.deleteAll("IV_SUB1_SUB1");
-            dbHelper.deleteAll("IV_SUB2");
         } else if (location.equals(CayenneProjects.LIFECYCLES_PROJECT)) {
             dbHelper.deleteAll("LIFECYCLES");
         } else if (location.equals(CayenneProjects.LOB_PROJECT)) {
+            dbHelper.deleteAll("CLOB_TEST_RELATION");
             if (accessStackAdapter.supportsLobs()) {
                 dbHelper.deleteAll("BLOB_TEST");
                 dbHelper.deleteAll("CLOB_TEST");
             }
-            dbHelper.deleteAll("CLOB_TEST_RELATION");
             dbHelper.deleteAll("TEST");
         } else if (location.equals(CayenneProjects.LOCKING_PROJECT)) {
             dbHelper.deleteAll("LOCKING_HELPER");
             dbHelper.deleteAll("REL_LOCKING_TEST");
             dbHelper.deleteAll("SIMPLE_LOCKING_TEST");
         } else if (location.equals(CayenneProjects.MAP_TO_MANY_PROJECT)) {
-            dbHelper.deleteAll("ID_MAP_TO_MANY");
             dbHelper.deleteAll("ID_MAP_TO_MANY_TARGET");
-            dbHelper.deleteAll("MAP_TO_MANY");
+            dbHelper.deleteAll("ID_MAP_TO_MANY");
             dbHelper.deleteAll("MAP_TO_MANY_TARGET");
+            dbHelper.deleteAll("MAP_TO_MANY");
         } else if (location.equals(CayenneProjects.MEANINGFUL_PK_PROJECT)) {
             dbHelper.deleteAll("MEANINGFUL_PK");
             dbHelper.deleteAll("MEANINGFUL_PK_DEP");
             dbHelper.deleteAll("MEANINGFUL_PK_TEST1");
         } else if (location.equals(CayenneProjects.MISC_TYPES_PROJECT)) {
-            dbHelper.deleteAll("ARRAYS_ENTITY");
-            dbHelper.deleteAll("CHARACTER_ENTITY");
-            if(accessStackAdapter.supportsLobs()) {
+            if (accessStackAdapter.supportsLobs()) {
                 dbHelper.deleteAll("SERIALIZABLE_ENTITY");
             }
+            dbHelper.deleteAll("ARRAYS_ENTITY");
+            dbHelper.deleteAll("CHARACTER_ENTITY");
         } else if (location.equals(CayenneProjects.MIXED_PERSISTENCE_STRATEGY_PROJECT)) {
-            dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY");
             dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY2");
+            dbHelper.deleteAll("MIXED_PERSISTENCE_STRATEGY");
         } else if (location.equals(CayenneProjects.MULTINODE_PROJECT)) {
             dbHelper.deleteAll("CROSSDB_M1E1");
             dbHelper.deleteAll("CROSSDB_M2E1");
@@ -159,36 +160,36 @@ public class DBCleaner {
         } else if (location.equals(CayenneProjects.NUMERIC_TYPES_PROJECT)) {
             dbHelper.deleteAll("BIGDECIMAL_ENTITY");
             dbHelper.deleteAll("BIGINTEGER_ENTITY");
-            dbHelper.deleteAll("BIT_TEST");
             dbHelper.deleteAll("BOOLEAN_TEST");
+            dbHelper.deleteAll("BIT_TEST");
+            dbHelper.deleteAll("SMALLINT_TEST");
+            dbHelper.deleteAll("TINYINT_TEST");
             dbHelper.deleteAll("DECIMAL_PK_TST");
             dbHelper.deleteAll("FLOAT_TEST");
             dbHelper.deleteAll("LONG_ENTITY");
-            dbHelper.deleteAll("SMALLINT_TEST");
-            dbHelper.deleteAll("TINYINT_TEST");
         } else if (location.equals(CayenneProjects.ONEWAY_PROJECT)) {
-            dbHelper.deleteAll("oneway_table1");
             dbHelper.deleteAll("oneway_table2");
-            dbHelper.deleteAll("oneway_table3");
+            dbHelper.deleteAll("oneway_table1");
             dbHelper.deleteAll("oneway_table4");
+            dbHelper.deleteAll("oneway_table3");
         } else if (location.equals(CayenneProjects.PERSISTENT_PROJECT)) {
             dbHelper.deleteAll("CONTINENT");
             dbHelper.deleteAll("COUNTRY");
         } else if (location.equals(CayenneProjects.PRIMITIVE_PROJECT)) {
             dbHelper.deleteAll("PRIMITIVES_TEST");
         } else if (location.equals(CayenneProjects.QUALIFIED_PROJECT)) {
-            dbHelper.deleteAll("TEST_QUALIFIED1");
             dbHelper.deleteAll("TEST_QUALIFIED2");
+            dbHelper.deleteAll("TEST_QUALIFIED1");
         } else if (location.equals(CayenneProjects.QUOTED_IDENTIFIERS_PROJECT)) {
-            dbHelper.deleteAll("QUOTED_ADDRESS");
             dbHelper.deleteAll("quote Person");
+            dbHelper.deleteAll("QUOTED_ADDRESS");
         } else if (location.equals(CayenneProjects.REFLEXIVE_PROJECT)) {
             dbHelper.deleteAll("REFLEXIVE");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_PROJECT)) {
             dbHelper.deleteAll("FK_OF_DIFFERENT_TYPE");
-            dbHelper.deleteAll("MEANINGFUL_FK");
             dbHelper.deleteAll("REFLEXIVE_AND_TO_ONE");
             dbHelper.deleteAll("RELATIONSHIP_HELPER");
+            dbHelper.deleteAll("MEANINGFUL_FK");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_ACTIVITY_PROJECT)) {
             dbHelper.deleteAll("ACTIVITY");
             dbHelper.deleteAll("RESULT");
@@ -199,26 +200,26 @@ public class DBCleaner {
             dbHelper.deleteAll("CLOB_DETAIL");
             dbHelper.deleteAll("CLOB_MASTER");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_COLLECTION_TO_MANY_PROJECT))
{
-            dbHelper.deleteAll("COLLECTION_TO_MANY");
             dbHelper.deleteAll("COLLECTION_TO_MANY_TARGET");
+            dbHelper.deleteAll("COLLECTION_TO_MANY");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_DELETE_RULES_PROJECT)) {
-            dbHelper.deleteAll("DELETE_RULE_FLATA");
-            dbHelper.deleteAll("DELETE_RULE_FLATB");
-            dbHelper.deleteAll("DELETE_RULE_JOIN");
+            dbHelper.deleteAll("DELETE_RULE_TEST3");
             dbHelper.deleteAll("DELETE_RULE_TEST1");
             dbHelper.deleteAll("DELETE_RULE_TEST2");
-            dbHelper.deleteAll("DELETE_RULE_TEST3");
+            dbHelper.deleteAll("DELETE_RULE_JOIN");
+            dbHelper.deleteAll("DELETE_RULE_FLATB");
+            dbHelper.deleteAll("DELETE_RULE_FLATA");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_FLATTENED_PROJECT)) {
             dbHelper.deleteAll("COMPLEX_JOIN");
-            dbHelper.deleteAll("FLATTENED_CIRCULAR");
-            dbHelper.deleteAll("FLATTENED_CIRCULAR_JOIN");
-            dbHelper.deleteAll("FLATTENED_TEST_1");
-            dbHelper.deleteAll("FLATTENED_TEST_2");
-            dbHelper.deleteAll("FLATTENED_TEST_3");
             dbHelper.deleteAll("FLATTENED_TEST_4");
+            dbHelper.deleteAll("FLATTENED_TEST_3");
+            dbHelper.deleteAll("FLATTENED_TEST_2");
+            dbHelper.deleteAll("FLATTENED_TEST_1");
+            dbHelper.deleteAll("FLATTENED_CIRCULAR_JOIN");
+            dbHelper.deleteAll("FLATTENED_CIRCULAR");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_SET_TO_MANY_PROJECT)) {
-            dbHelper.deleteAll("SET_TO_MANY");
             dbHelper.deleteAll("SET_TO_MANY_TARGET");
+            dbHelper.deleteAll("SET_TO_MANY");
         } else if (location.equals(CayenneProjects.RELATIONSHIPS_TO_MANY_FK_PROJECT)) {
             dbHelper.deleteAll("TO_MANY_FKDEP");
             dbHelper.deleteAll("TO_MANY_FKROOT");
@@ -239,18 +240,18 @@ public class DBCleaner {
         } else if (location.equals(CayenneProjects.TABLE_PRIMITIVES_PROJECT)) {
             dbHelper.deleteAll("TABLE_PRIMITIVES");
         } else if (location.equals(CayenneProjects.THINGS_PROJECT)) {
-            dbHelper.deleteAll("BAG");
             dbHelper.deleteAll("BALL");
-            dbHelper.deleteAll("BOX");
-            dbHelper.deleteAll("BOX_INFO");
             dbHelper.deleteAll("BOX_THING");
             dbHelper.deleteAll("THING");
+            dbHelper.deleteAll("BOX_INFO");
+            dbHelper.deleteAll("BOX");
+            dbHelper.deleteAll("BAG");
         } else if (location.equals(CayenneProjects.TOONE_PROJECT)) {
             dbHelper.deleteAll("TOONE_DEP");
             dbHelper.deleteAll("TOONE_MASTER");
         } else if (location.equals(CayenneProjects.UUID_PROJECT)) {
-            dbHelper.deleteAll("UUID_PK_ENTITY");
             dbHelper.deleteAll("UUID_TEST");
+            dbHelper.deleteAll("UUID_PK_ENTITY");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/df3494b6/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
index 4204412..d0e57b9 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
@@ -50,6 +50,10 @@ public class DeepMergeOperationInheritanceIT extends ServerCase {
     @Inject
     protected DataChannelInterceptor queryInterceptor;
 
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+    }
+
     @Test
     public void testDeepMergeExistingSubclass() {
 


Mime
View raw message