Overriding @Id defined in a @MappedSuperclass with JPA
I have a class AbstractEntity that is extended by all the entities in my application and basically acts as an Identifier provider. @MappedSuperclass public class AbstractEntity implements DomainEntity { private static final long serialVersionUID = 1L; /** This object's id */ @Id @GeneratedValue(strategy = GenerationType.AUTO) protected long id; @Temporal(TemporalType.TIMESTAMP) @Column(name="creation_date", nullable = false, updatable=false) private Date creationDate = new Date(); /** * @return the id */ public long getId() { return this.id; } /** * @param id the id to set */ public void setId