This is regarding hbm file creation in hibernate. In my database i am having 100 tables and i will be using all these tables for my querying.In such case do i need to create 100 hbm and pojo classes? or is there some other way to handle without creating hbm files for all the tables and only for few.Please clarify.
depends on the choices you make in your mappings - you mean my entity mappings(one to many,many to one etc..). In such a case also i have to create the hbm and pojo classes for all ,right ? So i think there is no way to reduce the number the hbm and pojo classes. Please correct me if i am wrong.
It depends which entities you choose to map (does you application need access to all of them right form the start?) and how you map them (i.e. table per class hierarchy etc.)
Hiberate has a range of generation tools you can use - the the website for details.
Joined: Feb 01, 2009
Yes. you need to.
We used NetBeans.
NetBeans has reverse engineering technique you can use. It takes the database connection and creates the HBM files and domain objects for you. It takes care of the relationships and also the multi-primary key issues. You can also go for annotation approach. Why go XML way? It is more easy to have the annotations and the domain object in the same file.