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 trying to update the existing schema programmatically using SchemaUpdate. I changed the name of the existing field name in specific table and then, I am creating the hibernate configuration object and adding the changed hbm.xml files into the configuration object.
But when I said SchemaUpdate.execute(true,true) it is creating the new field in the table instead of updating.
Here is my code:
Configuration hibConfiguration = new Configuration();
SchemaUpdate schemaUpdate = new SchemaUpdate(hibConfiguration);