cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnth...@apache.org
Subject svn commit: r1552767 - /cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java
Date Fri, 20 Dec 2013 17:56:35 GMT
Author: johnthuss
Date: Fri Dec 20 17:56:35 2013
New Revision: 1552767

URL: http://svn.apache.org/r1552767
Log:
Fixed Derby test failure

Modified:
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java?rev=1552767&r1=1552766&r2=1552767&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorTest.java
Fri Dec 20 17:56:35 2013
@@ -21,6 +21,7 @@ package org.apache.cayenne.dba;
 import java.util.Collections;
 
 import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.derby.DerbyPkGenerator;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
@@ -50,7 +51,8 @@ public class JdbcPkGeneratorTest extends
         JdbcPkGenerator pkGenerator = (JdbcPkGenerator) adapter.getPkGenerator();
 
         pkGenerator.setPkStartValue(Integer.MAX_VALUE * 2l);
-        if (!JdbcPkGenerator.class.equals(adapter.getPkGenerator().getClass())) { // AUTO_PK_SUPPORT
doesn't allow dropping PK support for a single entity
+        if (!JdbcPkGenerator.class.equals(adapter.getPkGenerator().getClass()) &&
+        		!DerbyPkGenerator.class.equals(adapter.getPkGenerator().getClass())) { // AUTO_PK_SUPPORT
doesn't allow dropping PK support for a single entity
             pkGenerator.dropAutoPk(node, Collections.singletonList(artistEntity));
         }
         pkGenerator.createAutoPk(node, Collections.singletonList(artistEntity));



Mime
View raw message