I have an entity with composite key so I use the @Embeddable and @EmbeddedId annotations. Embeddable class looks like this :
@Embeddable public class DitaAdm
Preferences -> Java Persistence -> JPA -> Errors/Warnings -> Attribute -> Embedded ID classes should not contain relationship mappings: (Ignore)