db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1437756 - in /db/torque/torque4/trunk/torque-test: ./ src/main/schema/ src/test/java/org/apache/torque/generated/peer/
Date Wed, 23 Jan 2013 21:45:33 GMT
Author: tfischer
Date: Wed Jan 23 21:45:33 2013
New Revision: 1437756

URL: http://svn.apache.org/viewvc?rev=1437756&view=rev
Log:
Remove features not supported by oracle from oracle test set

Modified:
    db/torque/torque4/trunk/torque-test/pom.xml
    db/torque/torque4/trunk/torque-test/src/main/schema/foreign-key-schema.xml
    db/torque/torque4/trunk/torque-test/src/main/schema/pk-schema.xml
    db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
    db/torque/torque4/trunk/torque-test/src/main/schema/types-schema.xml
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java

Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Wed Jan 23 21:45:33 2013
@@ -120,6 +120,8 @@
                     <filter token="DATABASE_SCHEMA" value="${torque.test.databaseSchema}"
/>
                     <filter token="ON_UPDATE_CASCADE" value="${torque.test.onUpdateCascade}"
/>
                     <filter token="ON_UPDATE_SETNULL" value="${torque.test.onUpdateSetNull}"
/>
+                    <filter token="ON_UPDATE_RESTRICT" value="${torque.test.onUpdateRestrict}"
/>
+                    <filter token="ON_DELETE_RESTRICT" value="${torque.test.onDeleteRestrict}"
/>
                     <filter token="BIT_DATA_TYPE" value="${torque.test.bitDataType}" />
                     <filter token="CURRENT_TIMESTAMP_DEFAULT" value="${torque.test.currentTimestampDefault}"
/>
                     <filter token="CURRENT_TIME_DEFAULT" value="${torque.test.currentTimeDefault}"
/>
@@ -488,7 +490,9 @@
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
         <torque.test.onUpdateCascade></torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull></torque.test.onUpdateSetNull>
-        <torque.test.bitDataType>VARCHAR</torque.test.bitDataType><!-- BIT
if database supports bIT type, something else if not -->
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
+        <torque.test.bitDataType>BOOLEANINT</torque.test.bitDataType><!--
BIT if database supports BIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
         <torque.test.currentTimestampDefault>default="CURRENT_TIMESTAMP"</torque.test.currentTimestampDefault><!--
default="CURRENT_TIMESTAMP" if database supports it -->
@@ -540,6 +544,8 @@
         <torque.test.databaseSchema>torque_schema</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -593,6 +599,8 @@
         <torque.test.databaseSchema>torque_schema</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -639,9 +647,11 @@
         <torque.test.profileDirectory>derby</torque.test.profileDirectory>
         <torque.test.idmethod>native</torque.test.idmethod>
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
-        <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
-        <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
-        <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
+        <torque.test.onUpdateCascade></torque.test.onUpdateCascade>
+        <torque.test.onUpdateSetNull></torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
+        <torque.test.bitDataType>BOOLEANINT</torque.test.bitDataType><!--
BIT if database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
         <torque.test.currentTimestampDefault>default="CURRENT_TIMESTAMP"</torque.test.currentTimestampDefault><!--
default="CURRENT_TIMESTAMP" if database supports it -->
@@ -689,6 +699,8 @@
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault></torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault></torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -737,6 +749,8 @@
         <torque.test.databaseSchema>torque_schema</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -783,11 +797,13 @@
         <torque.test.profileDirectory>oracle</torque.test.profileDirectory>
         <torque.test.idmethod>native</torque.test.idmethod>
         <torque.test.databaseSchema>torque</torque.test.databaseSchema>
-        <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
-        <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
-        <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
+        <torque.test.onUpdateCascade></torque.test.onUpdateCascade>
+        <torque.test.onUpdateSetNull></torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict></torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict></torque.test.onDeleteRestrict>
+        <torque.test.bitDataType>BOOLEANINT</torque.test.bitDataType><!--
BIT if database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
-        <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
+        <torque.test.currentTimeDefault>default="CURRENT_DATE"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
         <torque.test.currentTimestampDefault>default="CURRENT_TIMESTAMP"</torque.test.currentTimestampDefault><!--
default="CURRENT_TIMESTAMP" if database supports it -->
         <torque.driver>oracle.jdbc.driver.OracleDriver</torque.driver>
         <torque.targetDatabase>oracle</torque.targetDatabase>
@@ -833,6 +849,8 @@
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -881,6 +899,8 @@
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
         <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
         <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>BIT</torque.test.bitDataType><!-- BIT if
database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->
@@ -924,8 +944,10 @@
         <torque.test.profileDirectory>derbyEmbedded</torque.test.profileDirectory>
         <torque.test.idmethod>native</torque.test.idmethod>
         <torque.test.databaseSchema>bookstore</torque.test.databaseSchema>
-        <torque.test.onUpdateCascade>onUpdate="cascade"</torque.test.onUpdateCascade>
-        <torque.test.onUpdateSetNull>onUpdate="setnull"</torque.test.onUpdateSetNull>
+        <torque.test.onUpdateCascade></torque.test.onUpdateCascade>
+        <torque.test.onUpdateSetNull></torque.test.onUpdateSetNull>
+        <torque.test.onUpdateRestrict>onUpdate="restrict"</torque.test.onUpdateRestrict>
+        <torque.test.onDeleteRestrict>onDelete="restrict"</torque.test.onDeleteRestrict>
         <torque.test.bitDataType>VARCHAR</torque.test.bitDataType><!-- BIT
if database supports bIT type, something else if not -->
         <torque.test.currentDateDefault>default="CURRENT_DATE"</torque.test.currentDateDefault><!--
default="CURRENT_DATE" if database supports it -->
         <torque.test.currentTimeDefault>default="CURRENT_TIME"</torque.test.currentTimeDefault><!--
default="CURRENT_TIME" if database supports it -->

Modified: db/torque/torque4/trunk/torque-test/src/main/schema/foreign-key-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/foreign-key-schema.xml?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/foreign-key-schema.xml (original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/foreign-key-schema.xml Wed Jan 23
21:45:33 2013
@@ -82,8 +82,8 @@
     <column name="FK" required="true" type="INTEGER" javaType="primitive"/>
     <column name="NAME" type="VARCHAR" size="100"/>
     <foreign-key foreignTable="P_INTEGER_PK"
-        onUpdate="restrict"
-        onDelete="restrict">
+        @ON_UPDATE_RESTRICT@
+        @ON_DELETE_RESTRICT@>
       <reference local="FK" foreign="INTEGER_COLUMN"/>
     </foreign-key>
   </table>

Modified: db/torque/torque4/trunk/torque-test/src/main/schema/pk-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/pk-schema.xml?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/pk-schema.xml (original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/pk-schema.xml Wed Jan 23 21:45:33
2013
@@ -51,7 +51,7 @@
 
   <table name="BIT_COMPOSITE_PK" idMethod="none">
     <column name="PK1" primaryKey="true" type="VARCHAR" size="50"/>
-    <column name="PK2" primaryKey="true" type="BIT" javaType="object"/>
+    <column name="PK2" primaryKey="true" type="@BIT_DATA_TYPE@" javaType="object"/>
     <column name="PAYLOAD" type="VARCHAR"  size="50"/>
   </table>
 

Modified: db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml (original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml Wed Jan 23 21:45:33
2013
@@ -47,7 +47,7 @@
     <column name="ext_id" type="INTEGER"/>
     <column name="test" required="true" type="INTEGER"/>
 
-    <index name="index_ext_id">
+    <index name="index_ref_ext_id">
       <index-column name="ext_id"/>
     </index>
     <foreign-key foreignTable="ext">
@@ -60,7 +60,7 @@
     <column name="extext_id" type="INTEGER"/>
     <column name="test" required="true" type="INTEGER"/>
 
-    <foreign-key foreignTable="extext">
+    <foreign-key name="ref_to_extext_fk_2" foreignTable="extext">
       <reference local="extext_id" foreign="extext_id"/>
     </foreign-key>
   </table>

Modified: db/torque/torque4/trunk/torque-test/src/main/schema/types-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/types-schema.xml?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/types-schema.xml (original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/types-schema.xml Wed Jan 23 21:45:33
2013
@@ -32,7 +32,7 @@
 
   <table name="types_object" description="used to test the handling for all supported
types">
     <column name="id" type="INTEGER" javaType="object" primaryKey="true"/>
-    <column name="o_bit" type="BIT" javaType="object" />
+    <column name="o_bit" type="@BIT_DATA_TYPE@" javaType="object" />
     <column name="o_tinyint" type="TINYINT" javaType="object" />
     <column name="o_smallint" type="SMALLINT" javaType="object" />
     <column name="o_bigint" type="BIGINT" javaType="object" />
@@ -72,7 +72,7 @@ Column.getJavaObject() not implimented f
 <!--  Primitive types in separate table to keep row size from exceeding limits -->
   <table name="types_primitive" description="used to test the handling for all supported
types">
     <column name="id" type="INTEGER" javaType="primitive" primaryKey="true"/>
-    <column name="p_bit" type="BIT" javaType="primitive" />
+    <column name="p_bit" type="@BIT_DATA_TYPE@" javaType="primitive" />
     <column name="p_tinyint" type="TINYINT" javaType="primitive" />
     <column name="p_smallint" type="SMALLINT" javaType="primitive" />
     <column name="p_bigint" type="BIGINT" javaType="primitive" />
@@ -99,8 +99,8 @@ Column.getJavaObject() not implimented f
 
   <table name="BIT_TYPE" idMethod="none">
     <column name="ID" primaryKey="true" type="VARCHAR" size="10"/>
-    <column name="BIT_VALUE" type="BIT" />
-    <column name="BIT_OBJECT_VALUE" type="BIT" javaType="object"/>
+    <column name="BIT_VALUE" type="@BIT_DATA_TYPE@" />
+    <column name="BIT_OBJECT_VALUE" type="@BIT_DATA_TYPE@" javaType="object"/>
   </table>
 
   <table name="BLOB_TYPE">

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java?rev=1437756&r1=1437755&r2=1437756&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromJavaTest.java
Wed Jan 23 21:45:33 2013
@@ -5,7 +5,10 @@ import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.TimeZone;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.torque.BaseDatabaseTestCase;
+import org.apache.torque.adapter.OracleAdapter;
 import org.apache.torque.test.dbobject.JavaDefaultValues;
 
 /*
@@ -34,6 +37,8 @@ import org.apache.torque.test.dbobject.J
  */
 public class DefaultValuesFromJavaTest extends BaseDatabaseTestCase
 {
+    private static Log log = LogFactory.getLog(DefaultValuesFromJavaTest.class);
+
     /** The default date format. */
     private static String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
 
@@ -75,6 +80,12 @@ public class DefaultValuesFromJavaTest e
      */
     public void testCurrentTimeAsJavaDefault() throws Exception
     {
+        if (defaultAdapter instanceof OracleAdapter)
+        {
+            log.error("testLimitOffset(): "
+                    + "Oracle does not support the CURRENT_TIME function");
+            return;
+        }
         GregorianCalendar currentCalendarBefore = new GregorianCalendar();
         currentCalendarBefore.set(1970, 1, 1);
         JavaDefaultValues javaDefaultValues = new JavaDefaultValues();



---------------------------------------------------------------------
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