Thread:
 creating database tables 
 jnicho02   19 Apr 2004, 18:20 
 Re: creating database tables 
 brondsem   26 May 2004, 20:10 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: jnicho02 (19 Apr 2004, 18:20) Replies: 1, Views: 41298
Subject: creating database tables
It is useful to reference the SchemaExportTask in order to make a 
create-tables.sql script. Something like....

  <target name="createtables" description="creates database tables">
    <taskdef 
       name="schemaexport"
       classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
       
classpath="${classpath};${class.dir};${lib.dir}/hibernate2.jar;${lib.di
r}/dom4j-1.4.jar;${lib.dir}/commons-logging.jar;${lib.dir}/commons-
collections-2.1.jar;${lib.dir}/jtds-0.7.1.jar;${lib.dir}/odmg-3.0.jar">
    </taskdef>
    <schemaexport quiet="no" text="no" drop="no" delimiter=";"
      properties="${class.dir}/hibernate.properties" 
      output="create-tables.sql">
      <fileset dir="${class.dir}" includes="**/*.hbm.xml"/>
    </schemaexport>
  </target>
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]