Hi,
I am using the following
ant target to synchronize and update the DB.
<target name="schema_update" depends="persistence_config"
description="Update missing columns DB schema from the O/R mapping
files">
<taskdef name="schemaupdate"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
classpathref="project.class.path" />
<schemaupdate
properties="${release.dir}/${config.dir}/hibernate.properties"
quiet="no" text="no" >
<fileset dir="${config.hbm.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaupdate>
</target>
While running this target the ant conosle shows statements as follow,
"create table user_role (fk_role bigint not null, fk_user bigint not null, primary key (fk_user, fk_role))"...
I wonder why the create queries are being executed while running this target, instead only the update queries have to be executed.
(Note: the *.hbm.xml file has some newly inserted column, but this column was not being inserted into the corresponding table).
Atlast I get the message of "Build Successfull".
Can you help me to resolve this issue.
Regards
Ganesan