-->
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.  [ 1 post ] 
Author Message
 Post subject: schemaexport and hibernate.cfg.xml files
PostPosted: Wed Jul 07, 2004 4:44 am 
Newbie

Joined: Wed Jul 07, 2004 4:38 am
Posts: 5
hello everyone,
I've been using for a while the scheamexport tool using the hibernate.properties files with mysql without aving any problem.
!but now I use a hbernate.cfg.xml file. It works for saving and retrieving data (I use hibernate synchronizer) but it do not work with the schemaexport tool, the database stay empty but when I set the property 'text" to "yes" I see the right sql code.
Here is my hibernate.cfg.xml file :
Quote:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
<session-factory>
<!-- local connection properties -->
<property name="hibernate.connection.url">
jdbc:mysql://localhost/test2
</property>
<property name="hibernate.connection.driver_class">
org.gjt.mm.mysql.Driver
</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password" />
<!-- property name="hibernate.connection.pool_size"></property -->
<!-- dialect for MySQL -->
<property name="dialect">
net.sf.hibernate.dialect.MySQLDialect
</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_outer_join">true</property>
<mapping resource="hibernate/User.hbm" />
<mapping resource="hibernate/Groupes.hbm" />
</session-factory>
</hibernate-configuration>


and my schemaexport ant tack :
Quote:
<target name="schemaexport" depends="compile">
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="project.class.path" />
<schemaexport
properties="${class.root}/hibernate.properties"
quiet="no"
text="no"
drop="no"
delimiter=";"
>
<fileset dir="src">
<include name="**/*.hbm"/>
</fileset>
</schemaexport>
</target>


Thanks you in adance if you have any clue or solution.
Best regards,
Sebi


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

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.