When I run the example
on my system with mvn tomcat:run command,
Data in mysql tables get’s deleted.
So, I had to insert data every time I restart the application.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you followed the tutorial from the linked page exactly, the reason the MySQL data is being removed each time the application starts can be found in the
hibernate.cfg.xmlfile.Specifically, it’s these lines:
I don’t remember what the other values are off the top of my head, but I believe
validatewill only check that your schema is correct but not change anything.updatemay also work.