Eclipse error on mapping with @EmbeddedId

后端 未结 5 1454
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 09:26

I have an entity with composite key so I use the @Embeddable and @EmbeddedId annotations. Embeddable class looks like this :

@Embeddable
public class DitaAdm         


        
5条回答
  •  长发绾君心
    2020-12-29 09:26

    According to section 11.1.15 of the JPA 2.0 specification: Relationship mappings defined within an embedded id class are not supported. However, this might be supported by the JPA implementation you're using, even if it's not officially supported by the standard itself.

    If this is the case here, you might want to turn off validation for this in Eclipse under Window -> Preferences -> Java Persistence -> JPA -> Errors/Warnings -> Attributes -> Cannot resolve attribute name.

提交回复
热议问题