HibernateContainer clear data base

Hello Vaadin folks,

I’m new to Vaadin and hbncantainer. I run example app from wiki article “Using hibernate with vaadin” using mysql db and it works great. But, I notice what when new session factory is created, all data from tables Type and Workout is deleted (i.e. with each new tomcat run I get clean data base).

Why this happened? Any ideas?

That is an option of Hibernate. There is most likely some code setting the hibernate.hbm2ddl.auto property to create-drop. To keep the information, you need to use “validate” or “update”.

Thank you, this help.