Hi Max,
Thanks for the reply. I got a sample of how to use schemaupdate from the this URL
http://www.hibernate.org/385.html?cmd=comphist&histnode=2801 as well as from the hibernate tools reference guide 3.2.0 beta 10.
Following is my ant script:
Code:
<hibernatetool destdir="C:/DDL">
<configuration propertyfile="hibernate.properties">
<fileset dir="C:/HBM" id="id">
<include name="application.hbm.xml"/>
</fileset>
</configuration>
<hbm2ddl outputfilename="application.ddl" export="false" update="true"/>
</hibernatetool>
This is what I get in my console.
Code:
[echo] Starting Build...
[echo] Performing hbm2ddl..
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[echo] DDL generated...
BUILD SUCCESSFUL
However, I do not get the DDL generated nor is my schema getting updated automatically. What am I missing? I want the ddl to be stored in a file. I do not want an automatic export of the schema. I guess the update is not working in my case. If i remove update = "true" ddls are getting generated