You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2014/02/08 21:34:57 UTC

svn commit: r1566120 - /cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java

Author: aadamchik
Date: Sat Feb  8 20:34:57 2014
New Revision: 1566120

URL: http://svn.apache.org/r1566120
Log:
disabling CLOB comparisons for SQLServer

Modified:
    cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java

Modified: cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java?rev=1566120&r1=1566119&r2=1566120&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java (original)
+++ cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/unit/SQLServerUnitDbAdapter.java Sat Feb  8 20:34:57 2014
@@ -44,22 +44,32 @@ public class SQLServerUnitDbAdapter exte
     }
 
     @Override
-    public void willDropTables(Connection conn, DataMap map, Collection tablesToDrop)
-            throws Exception {
+    public void willDropTables(Connection conn, DataMap map, Collection tablesToDrop) throws Exception {
         dropConstraints(conn, map, tablesToDrop);
         dropProcedures(conn, map);
     }
-    
+
+    @Override
+    public boolean supportsLobComparisons() {
+        // people are suggesting using LIKE to compare TEXT columns... not sure
+        // what the right solution might be, but for now we are getting
+        // "The data types varchar(max) and text are incompatible in the equal to operator. in SQL Server2005 how to solve?"
+        // http://stackoverflow.com/questions/20180766/the-data-types-varcharmax-and-text-are-incompatible-in-the-equal-to-operator
+        return false;
+    }
+
     @Override
     public boolean supportsNullBoolean() {
         return true;
     }
 
-    // The code below was used with SQLServer <= 2005 to turn of autogenerated keys.
+    // 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...
+    // // 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.") ) {