Entity Table is not creating using JPA 2.1

后端 未结 6 901
小蘑菇
小蘑菇 2021-01-21 00:51

I am using JPA 2.1 in Netbeans to create my entity. If my database has no table then it should create table from entities.

When I deploy and run my enterprise applicati

6条回答
  •  一整个雨季
    2021-01-21 01:32

    to force EclipseLink to create tables during deployment time, add:

    
    

    to your persistence.xml. By default, tables are being created when needed, usually on first access to EMF from the application. This behavior is defined in section 9.4 of the JPA 2.1 spec.

提交回复
热议问题