Kaushik Balasubramanain
Kaushik Balasubramanain

Reputation: 1258

MySQL table automatically deleted on Restarting Tomcat Server

I am building a spring MVC web application. I am using Hibernate as my ORM. Whenever I restart my tomcat 7 server, it automatically deletes the table created previously. How to prevent this?

Upvotes: 4

Views: 3915

Answers (1)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340733

Search for hbm2ddl text somewhere in your configuration, close to Hibernate configuration properties. It should be set to update or none, apparently you have create-drop.

See also

Upvotes: 12

Related Questions