• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

When to declare mapping resources in hibernate configuration files

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?

Thanks in Advance..

Tapan Maru
tapanmaru@gmail.com
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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 ??
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic