hibernate workflow

hibernate, java

Solution

It depends on how you best conceptualize the program you are writing. When I am designing my system I usually think in terms of entities and their relationships to eachother, so for me, I start with my business objects, then write my hibernate mappings and let hibernate create the database.

Other people are able to think better in terms of database tables, in whcih case that approach is best for them. So you gotta decide which one works for you based on your experience.

Problem

I'm trying to write a program with Hibernate. My domain is now complete and I'm writing the database. I got confused about what to do. Should I - make my sql tables in classes and let the Hibernate make them - Or create tables in the database and reverse engineer it and let the hibernate make my classes? I heard the first option one from someone and read the second option on the Netbeans site. Does any one know which approach is correct?

Original source