小编Fle*_*i F的帖子

JPA @OneToMany和复合PK

我正在研究JPA项目.我需要在具有三个主键的类上使用@OneToMany映射.您可以在此之后找到错误和类.

    javax.persistence.PersistenceException: No Persistence provider for EntityManager named JTA_pacePersistence: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: 
javax.persistence.PersistenceException
javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [JTA_pacePersistence] failed.
Internal Exception: Exception [TOPLINK-7220] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The @JoinColumns on the annotated element [private java.util.Set isd.pacepersistence.common.Action.permissions] from the entity class [class isd.pacepersistence.common.Action] is incomplete. When the source entity class uses a composite primary key, …
Run Code Online (Sandbox Code Playgroud)

persistence jpa primary-key many-to-one

9
推荐指数
2
解决办法
3万
查看次数

标签 统计

jpa ×1

many-to-one ×1

persistence ×1

primary-key ×1