Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 537
Kaushik Balasubramanain Avatar asked Dec 17 '22 03:12

Kaushik Balasubramanain


1 Answers

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

  • Hibernate hbm2ddl.auto possible values and what they do?
like image 114
Tomasz Nurkiewicz Avatar answered Jan 11 '23 23:01

Tomasz Nurkiewicz