简体   繁体   中英

Generate all source hbm and java files using hibernate tools for eclipse

I'm a little confused. The tutorials and answers I have seen have you creating the hbm files. What's the point of that? I want to setup my mysql connection to my db and say generate and poof all the nesacary files must be there properties files hbm files java source code the works. Is tat possible or am I missing something fundamental?

In my opinion it is better to write hbm files on your own. cause the "generate and poof" way is not 100% full proof. Also if your domain object naming is not proper, it might create wrong column name . Plus you misses the hibernate various properties suitable for your requirements. Eg: You may want to use sequence as id generator but hbm defaults it to increment .

btw, why not look for annotation .

EDIT

You have to install hibernate tools. http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/plugins.html
Above is the step by step guide

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM