• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dealing with schema upgrades

 
Neha Gap
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers!

I would like to know if there is a good solution to dealing with schema upgrades in my application when these upgrades are done by someone else. For example, I have a set of hbm.xml files and corresponding java classes generated using Hibernate tools. Now in production, everything works fine until the db schema is upgraded. I do (my app does) not have access to do that so how do I deal with this using Hibernate?

Thanks,
Neha.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neha,
You should be finding out about database changes before they go into production. I recommend talking to your DBA about the importance of communication.

Even if you were told about the changes in advance, you would have two options:
1) Change the code once you know what the database changes are
2) Convince the DBA to make changes backward compatible. Maybe through the use of a view.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic