Hi,
I'm using the latest version of hibernate (3.1) and hibernate tools. I'm using EJB3.0.
I understand that hbm2ddl generates ddl from hbm.xml files. Since I dont really have hbm.xml files, is there another way to create the scheme directly from my entity beans classes (or .java)???
if no, what is the best way to create the hbm.xml files?
I'm using ant, and I would like to have something like the following:
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="hibernate-libs"/>
<target name="CreateDB">
<hibernatetool destdir="${basedir}">
<configuration propertyfile="${resources.dir}/hibernate.properties">
<fileset dir="${entity.beans.dir}">
<include name="**/*.java"/>
</fileset>
</configuration>
<hbm2ddl drop="true"/>
</hibernatetool>
</target>
Thanks,
Eyal.
|