SpinningCone wrote:
I'm working on a new project an have written all my classes but was hoping to have hibernate generate the xml files and create the database tables for me.
however using the latest tools in eclipse i can't seem to figure out how to do that. the code generation with a mapper exporter do sent create anything. and selecting new hbm.xml and then a class only creates a basic xml header.
does hibernate have any auto-generate tools or am i stuck writing all the xml files by hand?
In the latest release we got support for adding JPA annotations to existing classes (Source > Generate JPA Annotations).
In the nightly build of JBoss Tools/Hibernate Tools we got support for generating hbm.xml for existing classes (New hbm.xml mapping).
Try it out ;)
BUT remember this is just the first step - don't use it as a automatic mapping method. You need to optimize it for production.