db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: Re : FK troubles Identity
Date Tue, 09 Jan 2007 16:25:24 GMT
On 1/9/07, Laurent ROCHE <laurent_roche@yahoo.com> wrote:

> It is still not working properly i.e. not using ID from the data.
> Here is the related extract of my bouild.xml file:
> <target name="import-derby" description="Creates db and Loads data">
>       <taskdef name="ddlToDatabase"
>               classname="org.apache.ddlutils.task.DdlToDatabaseTask">
>          <classpath refid="classpath"/>
>       </taskdef>
>
>       <ddlToDatabase schemaFile="schema-pg.xml" sortforeignkeys="false" verbosity="DEBUG"
shutdowndatabase="true" >
>
>          <database url="jdbc:derby:pip_dev"
>                  driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
>                  username=""
>                  password=""/>
>
>          <createDatabase failonerror="true"/>
>          <writeSchemaToDatabase/>
>         <writeDataToDatabase datafile="data.xml" failonerror="true" ensureforeignkeyorder="true"
useexplicitidentityvalues ="true"/>
>
>       </ddlToDatabase>
>
> </target>
>
> What do I do wrong ?

You have to set useexplicitidentityvalues to false, otherwise DdlUtils
will use the values defined in the data XML file, not the ones
generated by the database.

Tom

Mime
View raw message