JPA exception: Object: … is not a known entity type

后端 未结 11 532

I\'m new to JPA and I\'m having problems with the autogeneration of primary key values.

I have the following entity:

package jpatest.entities;

impor         


        
11条回答
  •  囚心锁ツ
    2020-12-10 03:17

    I also have to add one other item to my persistence.xml when changing class/table defs so that the EM knows to build/update tables:

    
    

    If I want a fresh start, I instead use:

    
    

    I noticed that in your persistence.xml schema management is only set to "create tables" as opposed to drop/create, or update

提交回复
热议问题