This content has been marked as final.
Show 1 reply
-
1. Re: Keep Database Changes after server shutdown?
lvdberg Sep 14, 2010 3:08 AM (in response to sado)Hi,
this is a setting in the file persistence.xml. This file contains all properties to map the objects to the DB and it contains additional settings for Hibernate.
Look for the following line in that file:
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
and change it to:
<property name="hibernate.hbm2ddl.auto" value="update" />
This will keep the DB after shutdown and makes the neceesary changes in the DB while you're developing. Keep in mind that for developing purposes this works fine, but for production it needs the help of a professional DB-administrator to get the fine-tuning right.
Leo