db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1378438 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java
Date Wed, 29 Aug 2012 03:39:04 GMT
Author: tfischer
Date: Wed Aug 29 03:39:03 2012
New Revision: 1378438

URL: http://svn.apache.org/viewvc?rev=1378438&view=rev
Log:
MSSQL supports manual id insertion for identity columns only under very special circumstances;
ignore test for manual id insertion for MSSQL

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java?rev=1378438&r1=1378437&r2=1378438&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/dataobject/SaveTest.java
Wed Aug 29 03:39:03 2012
@@ -21,8 +21,11 @@ package org.apache.torque.generated.data
 
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.TorqueException;
+import org.apache.torque.adapter.MssqlAdapter;
 import org.apache.torque.criteria.Criteria;
 import org.apache.torque.test.Author;
 import org.apache.torque.test.AuthorPeer;
@@ -40,6 +43,8 @@ import org.apache.torque.util.CountHelpe
  */
 public class SaveTest extends BaseDatabaseTestCase
 {
+    private static Log log = LogFactory.getLog(SaveTest.class);
+
     /**
      * Tests the save method for a simple object.
      *
@@ -69,6 +74,11 @@ public class SaveTest extends BaseDataba
      */
     public void testInsertWithManualId() throws Exception
     {
+        if (defaultAdapter instanceof MssqlAdapter)
+        {
+            log.error("manual id insertion is not possible for MSSQL");
+            return;
+        }
         // prepare
         Criteria criteria = new Criteria();
         IntegerObjectPkPeer.doDelete(criteria);



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message