Author: tfischer
Date: Fri Feb 2 13:52:05 2007
New Revision: 502761
URL: http://svn.apache.org/viewvc?view=rev&rev=502761
Log:
In the JDBCTransformTask in the generator, only add the attribute "default" to
the column description in the generated schema if its value is not empty.
Fixes TORQUE-80
Thanks to Brian Telintelo for the patch.
Modified:
db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
db/torque/site/trunk/xdocs/changes.xml
Modified:
db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
URL:
http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java?view=diff&rev=502761&r1=502760&r2=502761
==============================================================================
---
db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
(original)
+++
db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
Fri Feb 2 13:52:05 2007
@@ -33,6 +33,7 @@
import java.util.Iterator;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -304,7 +305,7 @@
column.setAttribute("primaryKey", "true");
}
- if (defValue != null)
+ if (StringUtils.isNotEmpty(defValue))
{
// trim out parens & quotes out of def value.
// makes sense for MSSQL. not sure about others.
Modified: db/torque/site/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?view=diff&rev=502761&r1=502760&r2=502761
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Fri Feb 2 13:52:05 2007
@@ -32,6 +32,11 @@
<body>
<release version="3.3" date="in SVN">
+ <action type="fix" dev="tfischer" issue="TORQUE-80" due-to="Brian
Telintelo">
+ In the JdbcTransformTask of the generator, the attribute
+ "default&qout; is only aded to the generated schema if its value
+ is not empty.
+ </action>
<action type="add" dev="tfischer" issue="TORQUE-79">
Added check whether Torque is initialized in Torque.getConnection().
If Torque is not initialized, a corresponding TorqueException is thrown;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]