Author: tomdz
Date: Mon Jan 22 21:14:43 2007
New Revision: 498922
URL: http://svn.apache.org/viewvc?view=rev&rev=498922
Log:
Fixed bug in the WriteDataToFile subtask where the useExplicitIdentityValues
property was ignored
Modified:
db/ddlutils/trunk/build-sample.xml
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/CreateDatabaseCommand.java
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DropDatabaseCommand.java
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteDataToDatabaseCommand.java
Modified: db/ddlutils/trunk/build-sample.xml
URL:
http://svn.apache.org/viewvc/db/ddlutils/trunk/build-sample.xml?view=diff&rev=498922&r1=498921&r2=498922
==============================================================================
--- db/ddlutils/trunk/build-sample.xml (original)
+++ db/ddlutils/trunk/build-sample.xml Mon Jan 22 21:14:43 2007
@@ -37,6 +37,7 @@
<property name="alterdatabase" value="true"/>
<property name="delimitedsqlidentifiers" value="false"/>
<property name="verbosity" value="info"/>
+ <property name="useexplicitidentityvalues" value="false"/>
<!-- The classpath used for running the tasks -->
<path id="project-classpath">
@@ -127,7 +128,8 @@
</fileset>
<writedatatodatabase datafile="${datafile}"
- usebatchmode="false"/>
+ usebatchmode="false"
+
useexplicitidentityvalues="${useexplicitidentityvalues}"/>
</ddlToDatabase>
</target>
Modified:
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/CreateDatabaseCommand.java
URL:
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/CreateDatabaseCommand.java?view=diff&rev=498922&r1=498921&r2=498922
==============================================================================
---
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/CreateDatabaseCommand.java
(original)
+++
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/CreateDatabaseCommand.java
Mon Jan 22 21:14:43 2007
@@ -87,7 +87,7 @@
}
catch (UnsupportedOperationException ex)
{
- _log.error("Database platform " + getPlatform().getName() + " does
not support database creation " +
+ _log.error("Database platform " + platform.getName() + " does not
support database creation " +
"via JDBC or there was an error while creating it.",
ex);
}
Modified:
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DropDatabaseCommand.java
URL:
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DropDatabaseCommand.java?view=diff&rev=498922&r1=498921&r2=498922
==============================================================================
---
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DropDatabaseCommand.java
(original)
+++
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DropDatabaseCommand.java
Mon Jan 22 21:14:43 2007
@@ -68,7 +68,7 @@
}
catch (UnsupportedOperationException ex)
{
- _log.info("Database platform " + getPlatform().getName() + " does
not support database dropping via JDBC",
+ _log.info("Database platform " + platform.getName() + " does not
support database dropping via JDBC",
ex);
}
catch (Exception ex)
Modified:
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteDataToDatabaseCommand.java
URL:
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteDataToDatabaseCommand.java?view=diff&rev=498922&r1=498921&r2=498922
==============================================================================
---
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteDataToDatabaseCommand.java
(original)
+++
db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteDataToDatabaseCommand.java
Mon Jan 22 21:14:43 2007
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Iterator;
+import org.apache.ddlutils.Platform;
import org.apache.ddlutils.io.DataReader;
import org.apache.ddlutils.model.Database;
import org.apache.tools.ant.BuildException;
@@ -147,12 +148,13 @@
throw new BuildException("Please use either the datafile attribute
or the sub fileset element, but not both");
}
+ Platform platform = getPlatform();
DataReader dataReader = null;
- getPlatform().setIdentityOverrideOn(_useExplicitIdentityValues);
+ platform.setIdentityOverrideOn(_useExplicitIdentityValues);
try
{
- dataReader = getDataIO().getConfiguredDataReader(getPlatform(),
model);
+ dataReader = getDataIO().getConfiguredDataReader(platform, model);
dataReader.getSink().start();
if (_singleDataFile != null)
{