[JPA_SPEC-57] Support schema drop on restart Created: 11/May/13 Updated: 11/May/13
|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