This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using hibernate at DAO layer with spring MVC in my application. As per my understandings we have to declare mapping resources (hibernate mapping files) in hibernate configuration file. What if my application needs addition of tables in future? Does it mean that I will have to add mapping resources in hibernate configuration file and redeploy the project again?
Is there any alternative solution so that I can avoid redeployment of the project?
Yes, you will - if your application is going to use those tables. But this is a situation that would exist regardless of whether you are using Hibernate. If you have new tables you want your application to use you are going to have to do something to use them.
I have a doubt related to Tapan's doubt..
For including multiple mapping files, we can package our hbm.xml files inside a jar file and make hibernate load them by using the addJar(File jarFile) method of the Coniguration class...
But is there any way that I can declaratively do this in hibernate.cfg.xml ??