-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: SchemaExport without drop
PostPosted: Fri Jun 17, 2005 2:30 pm 
Newbie

Joined: Fri Jun 17, 2005 2:23 pm
Posts: 1
There is a way to run ant task <schemaexport> without generating drops statements before the create statements?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 17, 2005 2:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use the schemaexport ant task in the new toolset (tools.hibernate.org)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: help is still needed, please
PostPosted: Thu Aug 25, 2005 3:07 pm 
Newbie

Joined: Thu Aug 25, 2005 2:52 pm
Posts: 1
Location: Moscow, Russia
I use ant task in the new toolset, and still for some reason I always get drop statements in the schema export file, regardless of drop="no" (if, however, I put create="no", I get only drop statements). Here's my target:

Code:
   <target name="ddl" description="Generate DDL from Hibernate files" depends="compile, xdoclet">
      <path id="hibernatetool-classpath">
          <pathelement location="${lib.dir}/cglib/cglib-nodep-2.1.jar"/>
          <pathelement location="${lib.dir}/commons/commons-collections.jar"/>
          <pathelement location="${lib.dir}/commons/commons-logging.jar"/>
          <pathelement location="${lib.dir}/dom4j/dom4j-1.6.jar"/>
          <pathelement location="${lib.dir}/hibernate/hibernate-tools.jar"/>
          <pathelement location="${lib.dir}/hibernate/hibernate3.jar"/>
          <pathelement location="${lib.dir}/javax/jta.jar"/>
          <pathelement location="${lib.dir}/velocity/velocity-1.4.jar"/>
          <pathelement location="${lib.dir}/velocity/velocity-tools-generic-1.1.jar"/>
          <pathelement path="${classes.dir}"/>
      </path>
      <taskdef name="hibernatetool"
               classname="org.hibernate.tool.ant.HibernateToolTask"
               classpathref="hibernatetool-classpath"/>

      <mkdir dir="${ddl.dir}"/>
      <hibernatetool>
         <configuration propertyfile="${conf.dir}/hibernate.properties">
            <fileset dir="${hibernate.dir}">
               <include name="**/*.hbm.xml"/>
            </fileset>
         </configuration>
         
         <hbm2ddl destdir="${ddl.dir}" export="false" console="false" drop="no" create="yes"
                  outputfilename="create_objects.sql" delimiter=";"/>
      </hibernatetool> 
   </target>


Could you give a hint, please?
Code:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 25, 2005 3:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm - report it in jira

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.