[JPA_SPEC-57] Support schema drop on restart Created: 11/May/13  Updated: 11/May/13

Status: Open
Project: jpa-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: reza_rahman Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


javax.persistence.schema-generation.database.action=drop-and-create only drops the schema on undeploy/deploy. For rapid/agile/iterative development via IDEs, very frequently developers start and stop the app/server without necessarily triggering a deploy/undeploy cycle hence not performing a drop. In these scenarios, developers would want a schema drop to happen on app/server stop and start. Hibernate for example, supports this feature.

Such a feature could be supported via an additional property like javax.persistence.schema-generation.database.drop-on-restart=true, that is defaulted to false.

Comment by reza_rahman [ 11/May/13 ]

Do let me know if anything needs to be explained further - I am happy to help.

Please note that these are purely my personal views and certainly not of Oracle's as a company.

Comment by Mitesh Meswani [ 11/May/13 ]

javax.persistence.schema-generation.database.action=drop-and-create only drops the schema on deploy.

There might be scenarios where we might want to clean up database on undeploy. It would be nice to have an option where EMF.close() triggers a drop

Generated at Wed Oct 07 13:33:37 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.