<property name="hibernate.hbm2ddl.auto" value="update"/>
Hello,
I am planning on buying your book I think I am going to need it.
I have a very quick question to ask you first.
I am using JBoss AS 7 with JPA 2.0 and mapping to a MySQL database via mysql-connector-java-5.1.27-bin.jar
My problem is this, while the module is deployed and JBoss is running, records appear in the database fine. The moment I stop JBoss or undeploy the module the records dissappear. Nothing I seem to do makes any difference.
How is hibernate supposed to be used so that the records are not automatically deleted should JBoss stop?
I've tried the following options:
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.hbm2ddl.auto" value="create"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.hbm2ddl.auto" value="validate"/>
It doesn't seem to make any difference.
Is there a tutorial I can see that will show me how to preserve the records in the database?
Thanks,
Perry
|