Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need to change the database  RSS feed

 
kenji kunoichi
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to change the database I am using now . My application runs in spring-hibernate framework . Now to change the database which is the xml file I need to change ?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37384
531
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean change the DDL/table structure, right? You can do so in two ways:

1) Run the SQL alter statement at the database command line and update your Java entities.
2) Just update the Java entities and set the hibernate.hbm2ddl.auto property.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!