-->
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.  [ 2 posts ] 
Author Message
 Post subject: SchemaExport properties and configuration
PostPosted: Wed Dec 22, 2004 9:53 am 
Newbie

Joined: Thu Dec 18, 2003 4:13 am
Posts: 19
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 22, 2005 4:47 am 
Beginner
Beginner

Joined: Mon Jul 05, 2004 9:29 am
Posts: 38
remove hibernate in the name of your properties in the hibernate.cfg.xml

<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.