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