David Hoffer wrote:
1. Create hibernate mapping files from POJOs. (Do I have to annotate first?))
I don't have experience with auto-generation of mapping from POJO's. I'd recommend starting with your own mapping so you understand better what's going on. Use either Hibernate native hmb.xml files or JPA style annotations within your POJOs. See docs.
2. Create hibernate configuration file.
You have to do this manually. I don't believe Hibernate will ever generate connection properties or other runtime config for you. Just stick a hibernate.properties file containing all required parameters into your ${basedir}/src/main/resources dir so it'll be pushed through to ${project.build.outputDirectory} on compile phase. Hibernate3 plugin should find it here. If not, you can configure the path at which it expects this file. See docs.
3. Create db schema from 1 & 2. 4. Deploy schema to database.
I usually create an "init-database" maven profile in my pom.xml to handle both db drop/create and hbm2ddl execution directly against the database. This makes regeneration of the database as simple as "mvn -P init-database".
-Andy --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
