Try adding the following to your persistence.xml
For Hibernate:
To create:
<property name="hibernate.hbm2ddl.auto" value="update"/>
To drop and create:
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
For Toplink:
To create:
<property name="toplink.ddl-generation" value="create-tables"/>
To drop and create:
<property name="toplink.ddl-generation" value="drop-and-create-tables"/>
For EclipseLink:
To create:
<property name="eclipselink.ddl-generation" value="create-tables"/>
To drop and create:
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…