Hello there.
I need to add a new field to a database table that is already in production. On top of that, my project is only going live a year from now. In the meantime, there will be other projects being released, and we are using XML files to define "switches" where we can turn some functionalities on and off.
The bottom line is: I cannot just add the column to the database and to the mapping class, since it will break the projects that will be released before mine.
What I was thinking is to have different mappings, one for the current table and another one to map the new table (that includes the new column).
Is this an easy thing to do with Hibernate? I mean, how will I create my classes and my mappings? Just extending my current class to have the new column wouldn't work, since I want to keep the storing mechanism the same (to avoid duplication.)
I've done some research but couldn't find solutions for this situations (probably because I'm not searching the right terms, since I don't have any experience with Hibernate.)
Any help will be greatly appreciated.
Thanks a lot!
|