I have Entity with @EmbeddedIdin the field, and I override the access type for the field making it Propertyavailable. But this is ignored EclipseLink, Hibernatethis is normal. Netbeans also shows me an error because of this:
@EmbeddedId
Property
EclipseLink
Hibernate
The class must use a consistent access type (field or property).There is no identifier for this entity hierarchy.
@EmbeddedId private OneId id; @Transient private String cosmin; @Access(AccessType.PROPERTY) // ?? public String getCosmin() { return cosmin; } public void setCosmin(String cosmin) { this.cosmin = cosmin; }
The problem is that the entity skips the following class level annotation:
@Access(AccessType.FIELD)
@Entity. , , . , @EmbeddedId .
JPA 2.0 :
, undefined....Access (FIELD) , . , ().
.