cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r407361 - /incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
Date Wed, 17 May 2006 20:07:16 GMT
Author: aadamchik
Date: Wed May 17 13:07:15 2006
New Revision: 407361

URL: http://svn.apache.org/viewvc?rev=407361&view=rev
Log:
enabling generated keys testing for SQLServer - SQLServer 2005 supports them

Modified:
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java?rev=407361&r1=407360&r2=407361&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
(original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/objectstyle/cayenne/unit/SQLServerStackAdapter.java
Wed May 17 13:07:15 2006
@@ -56,7 +56,6 @@
 package org.objectstyle.cayenne.unit;
 
 import org.objectstyle.cayenne.dba.DbAdapter;
-import org.objectstyle.cayenne.dba.JdbcAdapter;
 
 /**
  * @author Andrei Adamchik
@@ -72,12 +71,15 @@
         return true;
     }
 
-    public void unchecked(CayenneTestResources resources) {
-        // see if MSSQL driver is used and turn off identity columns in this case...
-
-        String driver = resources.getConnectionInfo().getJdbcDriver();
-        if (driver != null && driver.startsWith("com.microsoft.")) {
-            ((JdbcAdapter) getAdapter()).setSupportsGeneratedKeys(false);
-        }
-    }
+    // The code below was used with SQLServer <= 2005 to turn of autogenerated keys.
+    // Modern SQLServer driver supports autogen keys just fine.
+    
+    // public void unchecked(CayenneTestResources resources) {
+    // // see if MSSQL driver is used and turn off identity columns in this case...
+    //
+    // String driver = resources.getConnectionInfo().getJdbcDriver();
+    // if (driver != null && driver.startsWith("com.microsoft.") ) {
+    // ((JdbcAdapter) getAdapter()).setSupportsGeneratedKeys(false);
+    // }
+    // }
 }



Mime
View raw message