Thoughts of MahipalInnovate to simplify |
|
Thursday Aug 07, 2008
Hibernate - POJO and HBM file creation best practice
Recently I was working on Hibernate and created a number of POJO and their corresponding hbm file. I am using Netbeans (who has support for Hibernate plugin , real helpful , http://netbeans.org ) Certain best practice I would like to make work more interesting.
ex. Create new Java Class i.e Person , Use hibernate plugin to create .hbm file , Give same name as Class file , Select Person as class name on next screen. This will create .hbm file with name as Person , no need to provide table attribute. Hibernate will create table with same name. This aovides unnecessary complexities in distinguice table name and class name
Do no mention Column attribute while declaring <Property> in .hbm file. Hibernate will create column with same name.
Resources : More will follow as I learn more ... enjoy your life ... n keep doing innovation ... only way to survive ...Posted at 01:19PM Aug 07, 2008 by Mahipalsinh Rana in Personal | Comments[0] Comments:
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||