How to auto-create database, schema and table only if they do not already exist

北战南征 提交于 2019-12-05 07:27:32

JPA 2.1 provides standard properties for creating schema. Look for

javax.persistence.schema-generation.database.action

and set to create or drop-and-create. Similarly there are properties for executing scripts at startup of an EMF. Docs for any compliant JPA implementation should document them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!