- Write hibernate hbm files and generate code and db-scripts from them.
- Create db-scripts from the data-model and reverse engineer this schema to generate hibernate classes and hbm files
At the moment we decided that we want to keep a close grip on what gets created inside db, so we went ahead with the second approach. After some use it looks like, we're taking alot of pain in work-arounds to not to touch generated java code(so that we can change data model anytime and regenerate the code). Let us see if this approach works out fine or if at some point we switch to 1st approach and start modifying the hbm files and generate db-scripts from them.