Thanks for Dennis and Max.
I'm pretty new to Hibernate and its Tool. So any information will be appreciated!
Max:
I have tried the Hibernate 3 Ant Tool, and was able to generate the POJO java classes based on the hbm.xml files.
Now I'm trying to generate hbm.xml files from the database schema. I understand I should use the 'reverse engineering' strategy in Hibernate 3 Ant Tool, right? But I can't make it right by following the only example in the document(
http://www.hibernate.org/hib_docs/tools/ant/).
Here is what I have:
<target name="ddl2xml" description="Generate .java from .hbm files.">
<taskdef
name="ddl2xml"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref ="compile-classpath"
/>
<ddl2xml destdir="${gen.dir}">
<jdbcconfiguration configurationfile="${webapp.dir}/WEB-INF/classes/hibernate.cfg.xml"/> </ddl2xml>
</target>
It doesn't generate anything.
I know my question seems dumb, but I cannot find any more examples of how to do it right. (Again, I'm trying to generate mapping files from DB schema)
Please advice.
Thanks