Modified: 
db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step2.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step2.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step2.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/tutorial/orm/step2.xml
 Tue Jul 14 12:46:20 2020
@@ -57,10 +57,10 @@ ant jdbc
  <li>autoIncrement attribute to columns</li>
  
  <source><![CDATA[
- <database xmlns="http://db.apache.org/torque/4.1/templates/database";
+ <database xmlns="http://db.apache.org/torque/5.0/templates/database";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://db.apache.org/torque/4.1/templates/database
-        
http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
+  xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database
+        
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
   name="default"
   defaultIdMethod="none" defaultJavaType="object">
  ]]></source>
@@ -97,10 +97,10 @@ ant jdbc
 
 <source><![CDATA[
 <?xml version="1.0" encoding="ISO-8859-1" ?>
-<database xmlns="http://db.apache.org/torque/4.1/templates/database";
+<database xmlns="http://db.apache.org/torque/5.0/templates/database";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  xsi:schemaLocation="http://db.apache.org/torque/4.1/templates/database
-        
http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
+  xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database
+        
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
   name="bookstore"
   defaultIdMethod="native">
 
@@ -253,10 +253,10 @@ ant jdbc
   or the
   <a href="../../orm-reference/database-4-0.xsd">Schema XSD</a>
   </li>
-  <li>4.1 strict schema or default
-  <a href="../../orm-reference/database-4-1-strict.xsd">strict Schema XSD</a>
+  <li>5.0 strict schema or default
+  <a href="../../orm-reference/database-5-0-strict.xsd">strict Schema XSD</a>
   or the
-  <a href="../../orm-reference/database-4-1.xsd">Schema XSD</a>
+  <a href="../../orm-reference/database-5-0.xsd">Schema XSD</a>
   </li>
   for the database schema.  In addition, you should
   include the XML declaration and XML schema specification
@@ -268,7 +268,7 @@ ant jdbc
   For additional information on
   the XML elements and attributes, please refer to the
   <a href="../../orm-reference/database-4-0.xsd">Schema XSD</a> 
-  or <a href="../../orm-reference/database-4-1.xsd">4.1 Schema XSD</a>.
+  or <a href="../../orm-reference/database-5-0.xsd">5.0 Schema XSD</a>.
 </p>
 
 </section>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/download.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/download.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/download.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/download.xml Tue Jul 14 
12:46:20 2020
@@ -44,6 +44,34 @@ The currently released versions of Torqu
       <th>Maven Plugin</th>
       <th>Documentation</th>
     </tr>
+    
+      <tr>
+      <td rowspan="2"><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-5.0/";>Torque 
5.0</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-runtime-5.0-bin.tar.gz";>TAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-runtime-5.0-bin.tar.gz.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-runtime-5.0-bin.tar.gz.sha512";>SHA512</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-generator-5.0-bin.tar.gz";>TAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-generator-5.0-bin.tar.gz.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-generator-5.0-bin.tar.gz.sha5121";>SHA512</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-templates-4.0.tar.gz";>TAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-templates-4.0.tar.gz.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-templates-4.0.tar.gz.sha512";>SHA512</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-ant-tasks-4.0-bin.tar.gz";>TAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-ant-tasks-4.0-bin.tar.gz.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-ant-tasks-4.0-bin.tar.gz.sha512";>SHA512</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-maven-plugin-4.0.jar";>JAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-maven-plugin-4.0.jar.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-maven-plugin-4.0.jar.sha512";>SHA512</a></td>
+
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/binaries/torque-site-4.0-site.tar.gz";>TAR</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-site-4.0-site.tar.gz.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/binaries/torque-site-4.0-site.tar.gz.sha512";>SHA512</a></td>
+    </tr>
 
     <tr>
       <td rowspan="2"><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/";>Torque 
4.0</a></td>
@@ -121,6 +149,13 @@ The currently released versions of Torqu
       <th>Version</th>
       <th>Download</th>
     </tr>
+    
+     <tr>
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-5.0/";>Torque 
5.0</a></td>
+      <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-5.0/source/torque-5.0-source-release.zip";>ZIP</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/source/torque-5.0-source-release.zip.asc";>Sig.</a>&nbsp;
+          <a 
href="https://downloads.apache.org/db/torque/torque-4.0/source/torque-5.0-source-release.zip.sha512";>SHA512</a></td>
+    </tr>
 
     <tr>
       <td><a 
href="http://www.apache.org/dyn/closer.cgi/db/torque/torque-4.0/";>Torque 
4.0</a></td>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/index.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/index.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/index.xml Tue Jul 14 
12:46:20 2020
@@ -57,7 +57,7 @@
      </p>
      
      <p>
-       Torque requires JDK 1.6 or higher.
+       Torque 5.0 requires JDK 1.8 or higher. Torque 4.0 requires JDK 1.6 or 
higher.
      </p>
    </section>
 
@@ -65,7 +65,11 @@
     <p>
      <ul>
       <li>
-        The most recent <i>production</i> release of Torque is 
+        The most recent beta <i>production</i> release of Torque is 
+        <a href="http://db.apache.org/torque";>Torque 5.0</a>.
+      </li>
+       <li>
+        The most recent stable <i>production</i> release of Torque is 
         <a href="http://db.apache.org/torque";>Torque 4.0</a>.
       </li>
      </ul>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/status.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/status.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/status.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/status.xml Tue Jul 14 
12:46:20 2020
@@ -37,7 +37,7 @@
         It is here that you'll find announcements related to Torque.
       </p>
       
-      <subsection name="2020 - Torque-4.1 released">
+      <subsection name="2020 - Torque-5.0 released">
         <p>
           This is the second production release of the Torque 4 branch.
         </p>

Modified: db/torque/torque4/trunk/torque-templates/pom.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/pom.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/pom.xml (original)
+++ db/torque/torque4/trunk/torque-templates/pom.xml Tue Jul 14 12:46:20 2020
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.torque</groupId>
     <artifactId>torque</artifactId>
-    <version>4.1-SNAPSHOT</version>
+    <version>5.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -69,9 +69,9 @@
     </dependency>
     
     <dependency>
-        <groupId>org.apache.fulcrum</groupId>
-        <artifactId>fulcrum-testcontainer</artifactId>
-        <scope>test</scope>
+       <groupId>org.junit.jupiter</groupId>
+       <artifactId>junit-jupiter</artifactId>
+       <scope>test</scope>
     </dependency>
     
   </dependencies>

Modified: db/torque/torque4/trunk/torque-templates/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/changes/changes.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/changes/changes.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/changes/changes.xml Tue Jul 14 
12:46:20 2020
@@ -23,7 +23,7 @@
   </properties>
 
   <body>
-  <release version="4.1-SNAPSHOT" date="in SVN">
+  <release version="5.0-SNAPSHOT" date="in SVN">
     <action type="change" dev="gk">
     - extracted java related transformer class from OMColumnTransformer
     - fixed not generated enum imports in vm-templates 

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLModelTransformer.java
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLModelTransformer.java?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLModelTransformer.java
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLModelTransformer.java
 Tue Jul 14 12:46:20 2020
@@ -125,7 +125,7 @@ public class SQLModelTransformer impleme
         {
             table.primaryKeyConstraintName = table.unqualifiedName + "_PK";
         }
-        if (table.sequenceName == null)
+        if (StringUtils.isBlank(table.sequenceName))
         {
             if (!table.idMethodParameterList.isEmpty())
             {

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -40,11 +40,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../../xsd/database-5-0-strict.xsd" />
 
   <!-- Documentation css -->
   <output name="css" file="datamodel.css">

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -40,11 +40,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../../xsd/database-5-0-strict.xsd" />
 
   <!-- Documentation xdoc -->
   <output name="torque.doc.xdoc.xdoc"  file="datamodel.xml">

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -38,11 +38,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../xsd/database-5-0-strict.xsd" />
 
   <output name="torque.sql.idtable.idtable">
     <filenameOutlet

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -38,11 +38,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../xsd/database-5-0-strict.xsd" />
 
   <output name="jdbc2schema">
     <filenameOutlet

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -38,11 +38,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../xsd/database-5-0-strict.xsd" />
 
   <output name="torque.om.dbObject" existingTargetStrategy="skip" 
outputDirKey="modifiable">
     <filenameOutlet

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -39,11 +39,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../xsd/database-5-0-strict.xsd" />
 
   <output name="torque.sql.ddl" >
     <filenameOutlet

Modified: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/createdb/conf/control.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/createdb/conf/control.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/createdb/conf/control.xml
 (original)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/createdb/conf/control.xml
 Tue Jul 14 12:46:20 2020
@@ -39,11 +39,11 @@
       
systemId="http://db.apache.org/torque/torque-4.0/documentation/orm-reference/database-4-0-strict.xsd";
       resource="../../../xsd/database-4-0-strict.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
-      resource="../../../xsd/database-4-1.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
+      resource="../../../xsd/database-5-0.xsd" />
   <entityReference
-      
systemId="http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";
-      resource="../../../xsd/database-4-1-strict.xsd" />
+      
systemId="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";
+      resource="../../../xsd/database-5-0-strict.xsd" />
 
   <output name="torque.sql.createdb">
     <filenameOutlet

Added: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0-strict.xsd
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0-strict.xsd?rev=1879858&view=auto
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0-strict.xsd
 (added)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0-strict.xsd
 Tue Jul 14 12:46:20 2020
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database-4-0-strict.xsd 1622915 2014-09-06 19:21:17Z tfischer $
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
+           targetNamespace="http://db.apache.org/torque/5.0/templates/database";
+           xmlns="http://db.apache.org/torque/5.0/templates/database";
+           elementFormDefault="qualified"
+           version="5.0">
+           
+  <xs:annotation>
+    <xs:documentation xml:lang="en">
+The XML schema used by version 5.0 and greater of the Apache Software
+Foundation Torque project(
+<a href="http://db.apache.org/torque";>http://db.apache.org/torque</a> )
+to model SQL database information. 
+This model restricts the available characters in java names and sql names
+as compared to the standard database.xsd
+    </xs:documentation>
+  </xs:annotation>
+  
+  <xs:redefine 
schemaLocation="http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";>
+    <xs:simpleType name="javaNameType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+  Java identifiers, e.g. [A-Za-z_$]A-Za-z_$0-9]*
+        </xs:documentation>
+      </xs:annotation>
+      <xs:restriction base="javaNameType">
+        <xs:pattern value="[A-Za-z_$][A-Za-z_$0-9]*" />
+      </xs:restriction>
+    </xs:simpleType>
+  
+    <xs:simpleType name="javaQualifiedNameType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+  Java fully qualified names (e.g. x.y.x)
+        </xs:documentation>
+      </xs:annotation>
+      <xs:restriction base="javaQualifiedNameType">
+        <xs:pattern
+                value="([A-Za-z_$][A-Za-z_$0-9]*[.])*[A-Za-z_$][A-Za-z_$0-9]*" 
/>
+      </xs:restriction>
+    </xs:simpleType>
+  
+    <xs:simpleType name="sqlNameType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+  SQL Standard non-delimited identifiers.
+        </xs:documentation>
+      </xs:annotation>
+      <xs:restriction base="sqlNameType">
+        <xs:pattern value="[A-Za-z$#][A-Za-z_$#0-9]*" />
+      </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="sqlQualifiedNameType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+  SQL Standard non-delimited identifiers.
+        </xs:documentation>
+      </xs:annotation>
+      <xs:restriction base="sqlQualifiedNameType">
+        <xs:pattern 
value="[A-Za-z$#][A-Za-z_$#0-9]*(\.[A-Za-z$#][A-Za-z_$#0-9]*)?" />
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:redefine>
+
+</xs:schema>
\ No newline at end of file

Added: 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0.xsd
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0.xsd?rev=1879858&view=auto
==============================================================================
--- 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0.xsd
 (added)
+++ 
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-5-0.xsd
 Tue Jul 14 12:46:20 2020
@@ -0,0 +1,1157 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database-4-0.xsd 1629463 2015-00-05 02:11:26Z tfischer $
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
+           targetNamespace="http://db.apache.org/torque/5.0/templates/database";
+           xmlns="http://db.apache.org/torque/5.0/templates/database";
+           elementFormDefault="qualified"
+           version="5.0">
+           
+  <xs:annotation>
+    <xs:documentation xml:lang="en">
+The XML schema used by version 5.0 and greater of the Apache Software
+Foundation Torque project(
+<a href="http://db.apache.org/torque";>http://db.apache.org/torque</a> )
+to model SQL database information. This model is used by various Torque
+utilities for managing the SQL Server info and to build the Java objects
+to access this data.
+
+The basic structure of a model is built using the database element
+as the root.  This will contain references to options, external (include)
+models, new SQL Domain definitions, and tables.  See the Torque project
+home page for more details.
+    </xs:documentation>
+  </xs:annotation>
+  
+<!-- =====================================
+     database element definition
+     ===================================== -->
+  <xs:element name="database" type="databaseType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The root element for defining a Torque database schema.
+      </xs:documentation>
+    </xs:annotation>
+  </xs:element>
+
+  <xs:complexType name="databaseType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The root type definition for a Torque database schema.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+A set of key/value options to be passed to custom generator templates.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>                  
+                  
+      <xs:element name="include-schema" type="includeSchemaType"
+                  minOccurs="0" maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Include another schema file in this schema (as if it were a part of this
+schema file).
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="external-schema" type="externalSchemaType"
+                  minOccurs="0" maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Reference another schema file from this schema (outbound connections only).
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="domain" type="domainType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Domains are used to define common attribute sets for columns.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="table" type="tableType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Defines a database table.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="view" type="viewType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Defines a database view.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="javaNameType" use="required">
+      <xs:annotation>
+        <xs:documentation xml:lang="en" >
+The name used to identify this schema in the generated
+Java objects and as the default JDBC connection pool to use.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="defaultJavaType" use="optional"
+                  type="javaReturnType" default="primitive" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Defines if the record object property getter / setters will 
+use objects (e.g. Integer) or primitives (e.g. int), defaults
+to primitive.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="defaultIdMethod" use="optional" type="idMethodType"
+                  default="none" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Defines the defaultIdMethod to use with tables which do not have an idMethod
+attribute defined. This attribute has 3 possible values, they are:
+
+- idbroker
+    Torque's software based id broker system
+- native
+    The SQL Server's native autoincrement/identifier process
+- none
+    Don't try to auto assign id numbers
+- null
+    Use the value previously set or the default value.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+
+<!-- =====================================
+     option element definition
+     ===================================== -->
+  <xs:complexType name="optionType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+These tags allows a set of key/value options to be passed to custom generator
+templates.
+      </xs:documentation>
+    </xs:annotation>
+      <xs:attribute name="key" type="xs:string" use="required" />
+      <xs:attribute name="value" type="xs:string" use="required" />
+  </xs:complexType>
+  
+<!-- =====================================
+     include-schema element definition
+     ===================================== -->
+  <xs:complexType name="includeSchemaType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Include another schema file in this schema (as if it were a part of this
+schema file).
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="filename" type="xs:string" use="required" />
+  </xs:complexType>
+
+<!-- =====================================
+     external-schema element definition
+     ===================================== -->
+  <xs:complexType name="externalSchemaType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Includes another schema file.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="filename" type="xs:string" use="required" />
+  </xs:complexType>
+  
+<!-- =====================================
+     domain element definition
+     ===================================== -->
+  <xs:complexType name="domainType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Domains are used to define attributes for columns.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="name" type="xs:string" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name used to reference this set of column attributes.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="type" use="optional" type="sqlDataType"
+                  default="VARCHAR" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The SQL Standard data type for the column
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size" type="xs:decimal" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The size of the field. E.g. Varchar(size) or Numeric(Size). Note that 
+while this still supports the original torque use of using a
+decimal number (5.2) to indicate the precision
+and scale in one attribute. Use of the scale attribute is preferred.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="scale" type="xs:integer" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The scale of the field.  E.g.decimal(size, scale)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="default" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The default column value
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The description of this domain for documentation purposes.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     table element definition
+     ===================================== -->
+  <xs:complexType name="tableType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The table element and its relevant attributes.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="column" type="columnType" maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+The column element and its relevant attributes
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:choice minOccurs="0" maxOccurs="unbounded" >
+        <xs:element name="foreign-key" type="foreignKeyType">
+          <xs:annotation>
+            <xs:documentation xml:lang="en">
+Define a foreign key constraint for this table.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="index" type="indexType" >
+          <xs:annotation>
+            <xs:documentation xml:lang="en">
+Defines an index for this table.
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="unique" type="uniqueType">
+          <xs:annotation>
+            <xs:documentation xml:lang="en">
+Define a unique value constraint
+            </xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="id-method-parameter" type="idMethodParameterType">
+        </xs:element>
+      </xs:choice>
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlQualifiedNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The table name of the SQL table.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="interface" type="javaQualifiedNameType"
+                  use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The interface attribute specifies an interface that should be referenced in
+the implements section of the generated extension class. If this is a fully
+qualified class name (i. e. the string contains dots), the interface will
+simply be implemented by the extension object. If the interface is a simple
+class name (without dots), an empty interface file will be generated in the
+extension object package. When this attribute is used, all methods that
+normally would return the extension object type will now return the interface
+type. This feature allows to use Torque generated classes in the context of
+other applications or APIs.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+        <xs:attribute name="peerInterface" type="javaQualifiedNameType"
+                  use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The interface attribute specifies an interface that should be referenced in
+the implements section of the generated peer class. If this is a fully
+qualified class name (i. e. the string contains dots), the interface will
+simply be implemented by the peer object. If the interface is a simple
+class name (without dots), an empty interface file will be generated in the
+peer package. This feature allows to use Torque generated peer classes
+in the context of other applications or APIs.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="baseClass" type="javaQualifiedNameType" use="optional">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The fully qualified class that the generated Java table
+record objects will extend. This class does not have to extend 
+org.apache.torque.om.BaseObject.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="basePeer" type="javaQualifiedNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The fully qualified class that the generated Java Peer objects will extend.
+Unlike baseClass, basePeer should extend BasePeer at some point in the chain,
+i.e. it needs to be the superclass.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="idMethod" use="optional" type="idMethodType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Defines the id method to automatically generate ids for this table.
+This attribute has 3 possible values, they are:
+
+- idbroker
+    Torque's software based id broker system
+- native
+    The SQL Server's native autoincrement / identifier process
+- none
+    Don't try to auto assign id numbers
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="abstract" use="optional" type="xs:boolean"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether or not to generate the class as Abstract or not
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaName" type="javaNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+This is the Java class name to use when generating the table. If
+this is missing the Java name is generated from the name attribute.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="skipSql" use="optional" type="xs:boolean"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether or not to skip SQL generation for this reference.  Useful for using
+Views or creating a "subset" of columns in an existing table.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+A description of this table.  Used for documentation and will be included in
+the table generation SQL if the server type supports this.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     column element definition
+     ===================================== -->
+  <xs:complexType name="columnType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The column element and its relevant attributes
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="enum-value" type="enumValueType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="inheritance" type="inheritanceType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Define an inheritance mapping of records to class by a key column.  See the
+inheritance How To document.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+                  
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The column name
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="type" use="optional" type="sqlDataType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The SQL data type for the column. Is required unless a domain is used.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size" type="xs:decimal" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The size of the field. E.g. Varchar(size) or Numeric(Size). Note that 
+while this still supports the original torque use of using a
+decimal number (5.2) to indicate the precision
+and scale in one attribute. Use of the scale attribute is preferred.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="scale" type="xs:integer" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The scale of the field.  E.g.decimal(size, scale)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="default" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The default column value
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="useDatabaseDefaultValue" type="xs:boolean" 
use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether to use the database default value if a new object is saved
+and the attribute value is equal to the java default value. Default is false.
+Has no effect on primitive boolean columns.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="primaryKey" use="optional"
+                  type="xs:boolean" default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether this column is part of the table's primary key.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="autoIncrement" use="optional"
+                  type="xs:boolean" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether or not to auto-increment this field (true or false, defaults to false)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="required" use="optional" type="xs:boolean"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether a value is required in this column (NULL ALLOWED) (true or false,
+defaults to false)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaName" type="javaNameType"
+                  use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The Java property name to use for this column in the record objects.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaType" use="optional"
+                  type="javaReturnType" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Defines if the record object property getter / setters will
+use objects (e.g. Integer) or primitives (e.g. int), defaults 
+to database attribute or primitive
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="domain" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The domain reference name to set common settings.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="inheritance" type="inheritanceAttrType" use="optional"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The inheritance method used (see inheritance documentation)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="protected" use="optional"
+                  type="xs:boolean" default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+If true, the setters and getters for this property will be protected rather
+than public.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="version" use="optional"
+                  type="xs:boolean" default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+If true, this column is used as a version number for optimistic locking.
+I.e. for updates, Torque will check that the version number in the database
+is equal to the version number of the supplied object
+and it will automatically increase the version number of the updated row.
+Setting version to true will only work for numeric columns and will produce
+code that does not compile if applied to other column types.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="enumType" use="optional" type="xs:string">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+If this attribute has a value, the java type for the column is an enum.
+The name of the enum type is contained in this attribute. It can be either
+fully qualified or unqualified.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The description of this column for documentation purposes.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     inheritance element definition
+     ===================================== -->
+  <xs:complexType name="inheritanceType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Define an inheritance mapping of records to class by a key column.  See the
+inheritance How To document.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="key" type="xs:string" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+A value found in the column marked as the inheritance key column
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="class" type="javaNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The class name for the object that will inherit the record values
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="extends" type="javaQualifiedNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The class that the inheritor class will extend
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     enumValue element definition
+     ===================================== -->
+  <xs:complexType name="enumValueType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Defines a possible value for an enum. If any of these elements occurs 
+for a column, Torque will generate an enum for this column.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="value" type="xs:string" use="required">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The value for the enum. Must be unique.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaName" type="xs:string" use="optional">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The java name for the enum. Must be unique and must not clash 
+with automatically determined javaNames for the same enum.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+A description for the enum value.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     foreign-key element definition
+     ===================================== -->
+  <xs:complexType name="foreignKeyType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Define a foreign key constraint for this table.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="reference" type="referenceType" maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Define a mapping between a local column containing a foreign key value and
+the foreign table column.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="optional" >
+        <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name used to create the foreign key constraint.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="foreignTable" type="sqlQualifiedNameType" 
use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name of the table that contains the foreign key
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="onDelete" use="optional" type="cascadeType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The action to take when the referenced value in foreignTable is deleted.
+Note this is handled by the database server and not Torque code.  Will not
+work if the DB server does not support this.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="onUpdate" use="optional" type="cascadeType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The action to take when the referenced value in foreignTable is updated.
+Note this is handled by the database server and not Torque code.  Will not
+work if the DB server does not support this.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     reference element definition
+     ===================================== -->
+  <xs:complexType name="referenceType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Define a mapping between a local column containing a foreign key value and
+the foreign table column.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="foreign" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The column in the foreign table that contains the key.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="local" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The column in this table that contains the foreign key.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     index element definition
+     ===================================== -->
+  <xs:complexType name="indexType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Defines an index for this table.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="index-column" type="indexColumnType"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Define a column to use in a table index.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name used in creating this index in the database.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     reference element definition
+     ===================================== -->
+  <xs:complexType name="indexColumnType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Define a column to use in a table index.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="name" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+A column name to use in this index.  Must exist in the table.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     unique element definition
+     ===================================== -->
+  <xs:complexType name="uniqueType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Define a unique value constraint
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="unique-column" type="uniqueColumnType"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Specify a column to use in the unique constraint.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name to use in defining this constraint.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     unique-column element definition
+     ===================================== -->
+  <xs:complexType name="uniqueColumnType" >
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Specify a column to use in the unique constraint.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:attribute name="name" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name to use in defining this constraint.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size" type="xs:decimal" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The size of the field. E.g. columnname(size). Mainly to customize restrictions 
in bytes/character restrictions without global changes.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     id-method-parameter element definition
+     ===================================== -->
+  <xs:complexType name="idMethodParameterType">
+    <xs:attribute name="name" type="xs:string" use="optional"
+                  default="default" />
+    <xs:attribute name="value" type="xs:string"
+                  use="required" />
+  </xs:complexType>
+
+<!-- =====================================
+     view element definition
+     ===================================== -->
+  <xs:complexType name="viewType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The view element and its relevant attributes.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="column" type="viewColumnType" maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+The column element and its relevant attributes
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The name of the SQL view.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="baseClass" type="javaQualifiedNameType" use="optional">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The fully qualified class that the generated Java view
+record objects will extend. This class does not have to extend 
+org.apache.torque.om.BaseObject.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="basePeer" type="javaQualifiedNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The fully qualified class that the generated Java Peer objects will extend.
+Unlike baseClass, basePeer should extend BasePeer at some point in the chain,
+i.e. it needs to be the superclass.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="abstract" use="optional" type="xs:boolean"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether or not to generate the class as Abstract or not
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaName" type="javaNameType" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+This is the Java class name to use when generating the view. If
+this is missing the Java name is generated from the name attribute.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="sqlSuffix" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The remainder of the sql for the view after column definitions.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="createSql" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The complete SQL for creating the view. Overrides all other means
+of generating the SQL for view creation.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="skipSql" use="optional" type="xs:boolean"
+                  default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Whether or not to skip SQL generation for this reference.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+A description of this view.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+  
+<!-- =====================================
+     view column element definition
+     ===================================== -->
+  <xs:complexType name="viewColumnType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+The column element and its relevant attributes
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="option" type="optionType" minOccurs="0"
+                  maxOccurs="unbounded" />
+      <xs:element name="inheritance" type="inheritanceType" minOccurs="0"
+                  maxOccurs="unbounded" >
+        <xs:annotation>
+          <xs:documentation xml:lang="en">
+Define an inheritance mapping of records to class by a key column.  See the
+inheritance How To document.
+          </xs:documentation>
+        </xs:annotation>
+      </xs:element>
+                  
+    </xs:sequence>
+    <xs:attribute name="name" type="sqlNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The column name
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="type" use="required" type="sqlDataType">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The SQL Standard data type for the column
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="size" type="xs:decimal" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The size of the field. E.g. Varchar(size) or Numeric(Size). Note that 
+while this still supports the original torque use of using a
+decimal number (5.2) to indicate the precision
+and scale in one attribute. Use of the scale attribute is preferred.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="scale" type="xs:integer" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The scale of the field.  E.g.decimal(size, scale)
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaName" type="javaNameType"
+                  use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The Java property name to use for this column in the record objects.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="javaType" use="optional"
+                  type="javaReturnType" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+Defines if the record object property getter / setters will
+use objects (e.g. Integer) or primitives (e.g. int), defaults 
+to database attribute or primitive
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="domain" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The domain reference name to set common settings.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="select" type="sqlQualifiedNameType" use="required" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The sql snippet which contains the value to select.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="protected" use="optional"
+                  type="xs:boolean" default="false" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+If true, the setters and getters for this property will be protected rather
+than public.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="description" type="xs:string" use="optional" >
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+The description of this column for documentation purposes.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+    <xs:attribute name="enumType" use="optional" type="xs:string">
+      <xs:annotation>
+        <xs:documentation xml:lang="en">
+If this attribute has a value, the java type for the column is an enum.
+The name of the enum type is contained in this attribute. It can be either
+fully qualified or unqualified.
+        </xs:documentation>
+      </xs:annotation>
+    </xs:attribute>
+  </xs:complexType>
+<!-- =====================================
+    Type definitions for attributes
+     ===================================== -->
+
+  <xs:simpleType name="sqlDataType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Standard SQL column data types.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:NMTOKEN">
+      <xs:enumeration value="BIT" />
+      <xs:enumeration value="TINYINT" />
+      <xs:enumeration value="SMALLINT" />
+      <xs:enumeration value="INTEGER" />
+      <xs:enumeration value="BIGINT" />
+      <xs:enumeration value="FLOAT" />
+      <xs:enumeration value="REAL" />
+      <xs:enumeration value="NUMERIC" />
+      <xs:enumeration value="DECIMAL" />
+      <xs:enumeration value="CHAR" />
+      <xs:enumeration value="VARCHAR" />
+      <xs:enumeration value="LONGVARCHAR" />
+      <xs:enumeration value="DATE" />
+      <xs:enumeration value="TIME" />
+      <xs:enumeration value="TIMESTAMP" />
+      <xs:enumeration value="BINARY" />
+      <xs:enumeration value="VARBINARY" />
+      <xs:enumeration value="LONGVARBINARY" />
+      <xs:enumeration value="NULL" />
+      <xs:enumeration value="OTHER" />
+      <xs:enumeration value="JAVA_OBJECT" />
+      <xs:enumeration value="DISTINCT" />
+      <xs:enumeration value="STRUCT" />
+      <xs:enumeration value="ARRAY" />
+      <xs:enumeration value="BLOB" />
+      <xs:enumeration value="CLOB" />
+      <xs:enumeration value="REF" />
+      <xs:enumeration value="BOOLEANINT" />
+      <xs:enumeration value="BOOLEANCHAR" />
+      <xs:enumeration value="DOUBLE" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="idMethodType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+A schema type for methods to create ids automatically.
+
+idbroker = Torque's software based id broker system
+native   = The SQL Server's native method, depends on database used
+           (e.g. autoincrement for MySQL, sequence for postgresql...)
+none     = Don't try to auto assign id numbers
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:NMTOKEN">
+      <xs:enumeration value="idbroker" />
+      <xs:enumeration value="native" />
+      <xs:enumeration value="none" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="javaReturnType">
+    <xs:restriction base="xs:NMTOKEN">
+      <xs:enumeration value="object" />
+      <xs:enumeration value="primitive" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="cascadeType" >
+    <xs:restriction base="xs:NMTOKEN">
+      <xs:enumeration value="cascade" />
+      <xs:enumeration value="setnull" />
+      <xs:enumeration value="restrict" />
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="inheritanceAttrType">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="single" />
+      <xs:enumeration value="false" />
+    </xs:restriction>
+  </xs:simpleType>
+  
+  <xs:simpleType name="javaNameType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Java identifiers, e.g. [A-Za-z_$]A-Za-z_$0-9]*
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string"/>
+  </xs:simpleType>
+
+  <xs:simpleType name="javaQualifiedNameType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+Java fully qualified names (e.g. x.y.x)
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string"/>
+  </xs:simpleType>
+
+  <xs:simpleType name="sqlNameType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+SQL Standard non-delimited identifiers.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string" />
+  </xs:simpleType>
+
+  <xs:simpleType name="sqlQualifiedNameType">
+    <xs:annotation>
+      <xs:documentation xml:lang="en">
+SQL Standard non-delimited identifiers.
+      </xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string" />
+  </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file

Modified: db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml 
(original)
+++ db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml Tue Jul 
14 12:46:20 2020
@@ -18,10 +18,10 @@
  under the License.
 -->
 <database
-    xmlns="http://db.apache.org/torque/4.1/templates/database";
+    xmlns="http://db.apache.org/torque/5.0/templates/database";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-    xsi:schemaLocation="http://db.apache.org/torque/4.1/templates/database
-        
http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1.xsd";
+    xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database
+        
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd";
     name="bookstore"
     defaultIdMethod="native" >
   <external-schema filename="ext-schema.xml" />

Modified: db/torque/torque4/trunk/torque-test/README.md
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/README.md?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/README.md (original)
+++ db/torque/torque4/trunk/torque-test/README.md Tue Jul 14 12:46:20 2020
@@ -1,33 +1,20 @@
-<!---
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
 # Test Module - Test against Databases
 
 ## General 
 
-- Start 
+- A profile exists for each database in folder src/test/profile/<db>.
+
+- Tested with Java 8 and Java 14.
+
+- A Maven test is started like this: 
 
 ```sh
-mvn test -P<data-type>
+mvn clean test -P<data-type>,managers,beans
 ```
 
-* e.g. for database Hsqldb use `mvn test -Phsqldb`. 
+* e.g. for database Hsqldb use `mvn clean test -Phsqldb,managers,beans`. 
 
-Running test against a non-memory or non-docker-containerized database 
requires a host-based database to be installed and running.
+Running tests against a non-memory or non-docker-containerized database 
requires a host-based database to be installed and running.
 
  ### Profiles
  
@@ -35,11 +22,11 @@ Find more details about database and db
 
 * Find profile names in **pom.xml** and in
 
-    ```sh
-    src/test/profile/<database>/
-    ```
+```sh
+src/test/profile/<database>/
+```
 
-## Workflow
+## Workflow Internals
 
 - check `src/main/schema` for the source schemas and the results in 
`target/generated-*` folders.
 
@@ -51,48 +38,62 @@ Find more details about database and db
 
 #### Hsqldb
 
-- In memory, no user access restriction as configured required. 
+- In memory, no user access restriction as configured is required. 
 
 ### Dockerized databases
 
-- Currently only **mysql** and **postgresql** adapter is supported (and 
selected tests). Run
+- This uses Docker Testcontainers. Find more information here: 
https://www.testcontainers.org/.
 
+- Tests should be run sequential, not parallel: 
https://www.testcontainers.org/test_framework_integration/junit_5/.
 
-    mvn -P mysql,docker-testcontainer,managers,beans clean test 
+- Additional Requirements (Junit 5): 
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html
 
-or
+- Currently only **mysql** and **postgresql** adapter is supported (and 
selected tests). 
 
-    mvn -P postgresql,docker-testcontainer,managers,beans clean test 
+- Run tests either with maven or e.g. in IDE (Eclipse, IntelliJ).
 
+```sh
+   mvn clean test -Pmysql,docker-testcontainer,managers,beans
+```
 
-If you get 
+or instead of mysql replace with postgresql.
+
+#### Resolving Issues
+
+A successfull connection will result in a message like this 
 
+       INFO  | org.testcontainers.dockerclient.DockerClientProviderStrategy - 
Found Docker environment with Docker for Windows (via TCP port 2375)
+       
+or 
+
+       INFO  | org.testcontainers.dockerclient.DockerClientProviderStrategy - 
Found Docker environment with Environment variables, system properties and 
defaults. Resolved dockerHost=unix:///var/run/docker.sock
+
+If you get 
 
     No <dockerHost> given, no DOCKER_HOST environment variable,     
     no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine'        
     and no external provider like Docker machine configured
     
-Docker Desktop (Windows) or docker is not running. If the error still shows 
pup after starting, 
+Docker Desktop (Windows) or docker is not running. If the error still shows up 
after starting, 
 you may configure and check your system. Provide in **docker-java.properties** 
DOCKER_HOST or other environment variables.
 find a templates in *src/test<database>/docker-resources/db*.
 
 
-#### Docker image (Profile docker-textcontainer)
+##### Docker image (Profile docker-textcontainer)
 
 Change into folder torque-test and check configuration files 
testcontainers.properties and docker-java.properties 
 in folder `src/test/profile/<profile>/docker-resources`.
 
 
-##### Docker OS System Adjustments
+###### Docker OS System Adjustments
 
 __Docker-maven-plugin and Docker Testcontainters needs appropriate environment 
settings__:
 
-* **Docker-Maven-Plugin** automatically checks the OS system and which URL to 
use to communicate with 
-the Docker daemon. Testcontainers expects settings in `docker-java.properties` 
[1],[2].
+* **Docker-Maven-Plugin** automatically checks the OS system and which URL to 
use to communicate with the docker daemon. Testcontainers expects settings in 
`docker-java.properties` [1],[2].
  
-Find the file docker-java.properties here: 
`src/test/profile/mysql/docker-resources`.
+Find the file docker-java.properties in: 
`src/test/profile/mysql/docker-resources`.
  
-* Docker daemon: By default setting the environment variable DOCKER_HOST ( URI 
/ daemon ) is required or anexposed daemon port. 
+* Docker daemon: By default setting the environment variable DOCKER_HOST ( URI 
/ daemon ) is required or an exposed daemon port. 
 
 Set it appropriately in `docker-java.properties`. (e.g. activate the daemon 
without TLS in Windows 10 in Docker Desktop or set it later by using an 
appropriate 
 (custom) Docker daemon 
[https://docs.microsoft.com/de-de/virtualization/windowscontainers/manage-docker/configure-docker-daemon]
 
@@ -103,7 +104,7 @@ in the default folders by creating a `da
 - Run the tests with profile __docker-testcontainer__ :
 
 ```sh
-mvn -P mysql,docker-testcontainer,managers,beans clean test 
+mvn clean test -P mysql,docker-testcontainer,managers,beans
 ```
 
 [1]: 
org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy
 
@@ -117,7 +118,7 @@ Change into folder torque-test and check
 Run the tests with:
 
 ```sh
-mvn -P postgresql,docker-testcontainer,managers,beans clean test 
+mvn clean test -P postgresql,docker-testcontainer,managers,beans
 ```
 
 ## Tests with hosted database
@@ -155,7 +156,13 @@ mvn test -P<data-type>, managers,beans
 - Generate project/classpath by using minimal test database profile hsqldb
 
 ```sh
-mvn eclpise:eclipse -P hsqldb
+mvn eclipse:eclipse -P hsqldb, managers,beans
+```
+
+or with Testcontainers (recommended)
+
+```sh
+mvn eclipse:eclipse -P mysql,docker-testcontainer,managers,beans
 ```
 
 ### Maven Database Test with Remote Standard Socket Attachment
@@ -167,6 +174,10 @@ Example: Attach example opens port 8000
 
 * or set `<forkCount>0</forkCount>` in pom.xml.
 
+Alternatively use Surefire debugging:
+
+ mvn -Dmaven.surefire.debug test
+
 ## TODO
 - Use Java Testcontainers Docker in other database settings ...
 

Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Tue Jul 14 12:46:20 2020
@@ -38,7 +38,7 @@
   <parent>
     <groupId>org.apache.torque</groupId>
     <artifactId>torque</artifactId>
-    <version>4.1-SNAPSHOT</version>
+    <version>5.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
@@ -51,14 +51,14 @@
   <properties>
     <onSqlError>abort</onSqlError>
     <torque.test.derby.version>10.14.2.0</torque.test.derby.version>
-    <torque.test.hsqldb.version>2.5.0</torque.test.hsqldb.version><!-- 2.5.0 
as of june 2019 -->
+    <torque.test.hsqldb.version>2.5.1</torque.test.hsqldb.version><!-- 2.5.1 
as of june 2020 -->
     <torque.test.mssql.version>1.2.7</torque.test.mssql.version>
-    <torque.test.mysql.version>8.0.18</torque.test.mysql.version><!-- 5.1.48 , 
8.0.18-->
-    <torque.test.log4j2.version>2.12.1</torque.test.log4j2.version>
+    <torque.test.mysql.version>8.0.21</torque.test.mysql.version><!-- 5.1.48 , 
8.0.18-->
+    <torque.test.log4j2.version>2.13.3</torque.test.log4j2.version>
     <torque.test.oracle.version>10.2.0.3.0</torque.test.oracle.version>
-    
<torque.test.postgres.jdbc.version>42.2.9</torque.test.postgres.jdbc.version><!--
 9.1-901.jdbc4, -->
-    <torque.test.postgres.version>12.1</torque.test.postgres.version>
-    
<torque.test.testcontainer.version>1.12.5</torque.test.testcontainer.version>
+    
<torque.test.postgres.jdbc.version>42.2.14</torque.test.postgres.jdbc.version><!--
 9.1-901.jdbc4, -->
+    <torque.test.postgres.version>12.3</torque.test.postgres.version>
+    
<torque.test.testcontainer.version>1.14.3</torque.test.testcontainer.version>
     <!-- -->
     <torque.test.idmethod>native</torque.test.idmethod>
   </properties>
@@ -95,23 +95,48 @@
       <artifactId>commons-dbcp2</artifactId>
       <scope>test</scope>
     </dependency>
-
+     <dependency>
+        <groupId>org.junit.jupiter</groupId>
+        <artifactId>junit-jupiter</artifactId>
+        <scope>test</scope>
+     </dependency>
+    
     <!-- avalon -->
     <dependency>
       <groupId>org.apache.avalon.framework</groupId>
       <artifactId>avalon-framework-impl</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.fulcrum</groupId>
-      <artifactId>fulcrum-testcontainer</artifactId>
-      <scope>test</scope>
-    </dependency>
+    
     <dependency>
       <groupId>org.apache.fulcrum</groupId>
       <artifactId>fulcrum-yaafi</artifactId>
       <scope>test</scope>
     </dependency>
+    
+     <dependency>
+        <groupId>org.apache.fulcrum</groupId>
+        <artifactId>fulcrum-testcontainer</artifactId>
+        <version>1.0.8</version>
+        <exclusions>
+            <exclusion> 
+               <groupId>*</groupId>
+               <artifactId>*</artifactId>
+            </exclusion>
+        </exclusions> 
+      </dependency>
+      
+      <dependency>
+             <groupId>org.mockito</groupId>
+           <artifactId>mockito-core</artifactId>
+      </dependency>  
+      
+      <dependency>
+               <groupId>javax.servlet</groupId>
+               <artifactId>javax.servlet-api</artifactId>
+               <version>3.1.0</version>
+       </dependency>
+      
     <!-- testcontainer minimal shared resources -->
     <dependency>
       <groupId>org.testcontainers</groupId>
@@ -125,6 +150,18 @@
       <version>${torque.test.testcontainer.version}</version>
       <scope>test</scope>
     </dependency>
+      <dependency>
+        <groupId>org.junit.platform</groupId>
+        <artifactId>junit-platform-launcher</artifactId>
+        <scope>test</scope>
+    </dependency>
+    <dependency>
+               <groupId>junit</groupId>
+               <artifactId>junit</artifactId>
+               <version>4.13</version>
+         <scope>test</scope>
+     </dependency>
+
   </dependencies>
 
   <build>
@@ -565,6 +602,7 @@
         <configuration>
           <excludes>
             <exclude>velocity.log</exclude>
+            <exclude>README.md</exclude>
             <exclude>.checkstyle</exclude>
             <exclude>checkstyle-cache.ccf</exclude>
             <exclude>derby.log</exclude>
@@ -1230,12 +1268,12 @@
             <!-- 
             Build image:
             requires a started docker host - starts database for 
sql-maven-plugin.
-            caution: Cancelling the maven process before life cycle 
process-classes is reached, the docker has to be stopped manually, docker stop 
<id>.
+            caution: Cancelling the maven process before life cycle 
process-classes is reached, requires the docker to be stopped manually with 
docker stop <id>.
             -->
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
-                <version>0.30.0</version>
+                <version>0.33.0</version>
                 <configuration>
                     
<filter>${docker.image.name}:${docker.image.version}</filter>
                 </configuration>
@@ -1247,7 +1285,7 @@
                             <goal>start</goal>
                         </goals>
                         <configuration>
-                            <!-- may set it here environment variables: 
dockerhost, .. -->
+                            <!-- may set here environment variables: 
dockerhost, but .. -->
                             <images>
                                 <image>
                                     
<name>${docker.image.name}:${docker.image.version}</name>
@@ -1383,6 +1421,7 @@
                      
<include>**/testcontainer/${torque.test.profileDirectory}/**</include>
                 </includes>
                 <!--groups>DockerCallback</groups-->
+                <!-- forkCount zero is required, as otherwise no tests will be 
launcehd by testcontainers -->
                  <forkCount>0</forkCount>
                  <reuseForks>false</reuseForks>
               </configuration>

Modified: 
db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml 
(original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/bookstore-schema.xml 
Tue Jul 14 12:46:20 2020
@@ -20,10 +20,10 @@
 
 <database name="@DATABASE_DEFAULT@"
     defaultIdMethod="@DATABASE_ID_METHOD@"
-    xmlns="http://db.apache.org/torque/4.1/templates/database";
+    xmlns="http://db.apache.org/torque/5.0/templates/database";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-    xsi:schemaLocation="http://db.apache.org/torque/4.1/templates/database 
-        
http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";>
+    xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database 
+        
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";>
 
   <!-- =================================================== -->
   <!-- B O O K  T A B L E                                  -->

Modified: 
db/torque/torque4/trunk/torque-test/src/main/schema/id-table-schema.xml
URL: 
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/id-table-schema.xml?rev=1879858&r1=1879857&r2=1879858&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/id-table-schema.xml 
(original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/id-table-schema.xml Tue 
Jul 14 12:46:20 2020
@@ -33,8 +33,8 @@
 <database name="@DATABASE_DEFAULT@"
     xmlns="http://db.apache.org/torque/4.0/templates/database";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-    xsi:schemaLocation="http://db.apache.org/torque/4.1/templates/database 
-        
http://db.apache.org/torque/torque-4.1/documentation/orm-reference/database-4-1-strict.xsd";>
+    xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database 
+        
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0-strict.xsd";>
 
   <table name="ID_TABLE" idMethod="idbroker">
     <column name="ID_TABLE_ID" required="true" primaryKey="true" 
type="INTEGER"/>



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

Reply via email to