You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by ht...@apache.org on 2013/06/11 20:59:11 UTC

svn commit: r1491905 - in /openjpa/branches/2.2.x: ./ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java

Author: hthomann
Date: Tue Jun 11 18:59:11 2013
New Revision: 1491905

URL: http://svn.apache.org/r1491905
Log:
OPENJPA-2373: Made further updates to the test created for this JIRA.

Modified:
    openjpa/branches/2.2.x/   (props changed)
    openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java

Propchange: openjpa/branches/2.2.x/
------------------------------------------------------------------------------
  Merged /openjpa/branches/2.2.1.x:r1491895

Modified: openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java?rev=1491905&r1=1491904&r2=1491905&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java (original)
+++ openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/jointable/onetomany/TestMapsIdWithAutoGeneratedKey.java Tue Jun 11 18:59:11 2013
@@ -19,19 +19,13 @@
 package org.apache.openjpa.persistence.inheritance.jointable.onetomany;
 
 
-import java.io.IOException;
-import java.sql.SQLException;
-
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
 
 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
-import org.apache.openjpa.jdbc.meta.MappingTool;
-import org.apache.openjpa.jdbc.meta.MappingTool.Flags;
+import org.apache.openjpa.jdbc.sql.DB2Dictionary;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
-import org.apache.openjpa.jdbc.sql.OracleDictionary;
-import org.apache.openjpa.jdbc.sql.SQLServerDictionary;
-import org.apache.openjpa.jdbc.sql.SybaseDictionary;
+import org.apache.openjpa.jdbc.sql.DerbyDictionary;
 import org.apache.openjpa.persistence.common.apps.Part;
 import org.apache.openjpa.persistence.common.apps.PartPK;
 import org.apache.openjpa.persistence.common.apps.Shirt;
@@ -71,7 +65,7 @@ import org.apache.openjpa.persistence.te
  *
  */
 public class TestMapsIdWithAutoGeneratedKey extends SingleEMFTestCase {
-    boolean disabled = false;
+    boolean disabled = true;
     
     public void setUp() {
         super.setUp(DROP_TABLES, 
@@ -80,13 +74,8 @@ public class TestMapsIdWithAutoGenerated
         	Part.class, PartPK.class);
         
         DBDictionary dic = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
-        if (!dic.supportsAutoAssign) {
-            disabled = true;
-            return;
-        }
-        if (dic instanceof SQLServerDictionary || dic instanceof OracleDictionary || dic instanceof SybaseDictionary) {
-            disabled = true;
-            return;
+        if (dic.supportsAutoAssign && (dic instanceof DB2Dictionary || dic instanceof DerbyDictionary)) {
+            disabled = false;
         }
     }