In Roo, to change the persistence type, you issue the command. But this doesn’t take effect and data is not retained for the next run.
jpa setup –provider HIBERNATE –database HYPERSONIC_PERSISTENT
Reason:
JPA uses the file - /src/main/resources/META-INF/persistence.xml to specify how existing data should be treated upon every restart of the server.
Solution:
Change the value of <property name=”hibernate.hbm2ddl.auto”> to “update”
<!– value=”create” to build a new database on each run; value=”update” to modify an existing database; value=”create-drop” means the same as “create” but also drops tables when Hibernate closes; value=”validate” makes no changes to the database –>
<property name=”hibernate.hbm2ddl.auto” value=”update”/>




