Hibernate version: 3.0b1
The very usefull SchemaExport task cannot read all parameters from the single hibernate.cfg.xml file. Actually, my hibernate.cfg.xml file contains the list of mapped classes (*.hbm.xml) plus the following parameters :
Code:
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.url">jdbc:hsqldb:hsql://localhost/gringottsdb</property>
<property name="connection.username">sa</property>
<property name="connection.password">admin</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
However, I have to provide a properties file containing those two lines:
Code:
hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.dialect=org.hibernate.dialect.HSQLDialect
The ant build file contains the following taskdef and target :
Code:
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="class.path"/>
<schemaexport
properties="${toolz.home}/schemaexport.properties"
config="${config.home}/hibernate.cfg.xml"
quiet="yes"
text="yes"
drop="yes"
delimiter=";"
output="${toolz.home}/drops.sql">
</schemaexport>
Is this the expected way to use it or am I missing something (wrong parameters names, etc..) ?
Thanx in advance
Xavier.