db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1329707 - in /db/torque/torque4/trunk/torque-templates/src/main: java/org/apache/torque/templates/transformer/SchemaTypeHelper.java resources/org/apache/torque/templates/xsd/database-4-0.xsd
Date Tue, 24 Apr 2012 13:22:05 GMT
Author: tfischer
Date: Tue Apr 24 13:22:04 2012
New Revision: 1329707

URL: http://svn.apache.org/viewvc?rev=1329707&view=rev
Log:
TORQUE-191 make type attribute mandatory for columns

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java?rev=1329707&r1=1329706&r2=1329707&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
Tue Apr 24 13:22:04 2012
@@ -74,11 +74,11 @@ public final class SchemaTypeHelper
         SchemaType schemaType = null;
         String schemaTypeString = (String) columnElement.getAttribute(
                 TorqueSchemaAttributeName.TYPE.getName());
-        // TODO: should there be a default type ? If not, throw an exception.
         if (schemaTypeString == null)
         {
-            schemaTypeString = controllerState.getStringOption(
-                    TemplateOptionName.DEFAULT_TYPE);
+            throw new SourceTransformerException("type attribute not set"
+                    + " in Column "
+                    + columnNameFromSchema);
         }
         schemaType = SchemaType.valueOf(schemaTypeString);
         if (schemaType == null)

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd?rev=1329707&r1=1329706&r2=1329707&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/xsd/database-4-0.xsd
Tue Apr 24 13:22:04 2012
@@ -439,11 +439,10 @@ The column name
         </xs:documentation>
       </xs:annotation>
     </xs:attribute>
-    <xs:attribute name="type" use="optional" type="sqlDataType"
-                  default="VARCHAR" >
+    <xs:attribute name="type" use="required" type="sqlDataType">
       <xs:annotation>
         <xs:documentation xml:lang="en">
-The SQL Standard data type for the column
+The SQL data type for the column
         </xs:documentation>
       </xs:annotation>
     </xs:attribute>



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