I'm trying to build a spring roo project using hibernate and an oracle database. The oracle database contains tables used by another application.
I have an entity User that already exists in the database, containing thousands of users and shared by another application.
My new roo project contains the user entity and also some others. The persistence.xml is configured with the following property:
<property name="hibernate.hbm2ddl.auto" value="update"/>
On the first deployment of the app, hibernate fails because there are no tables for the entities. Changing the value to "create" fixes this, but wipes the user table :(
Is there a way around this? What I would like to do is this
- property value is "create" but the User entity is excluded somehow
- Deploy application, tables are created etc. Existing User table is used.
- Stop application
- Modify property value to "update"
- No data loss :)
Many thanks.