duplicated id column when abstract id methods are defined in a @MappedSuperclass

Description

The following classes:

@MappedSuperclass
public abstract class BaseEntity {
public abstract Long getId();

public abstract void setId(Long id);
}

@Entity
@Table(name="STCB")
public class SimpleTestClassB extends BaseEntity {

private Long primaryKey;

@Override
@Id
@Column(nullable = false, precision = 10, name = "sb_id")
public Long getId() {
return primaryKey;
}

@Override
public void setId(Long primaryKey) {
this.primaryKey = primaryKey;
}
}

will generate the following table:

create table STCB (sb_id number(19,0) not null, id number(19,0), primary key (sb_id));

Environment

Database H2, Hibernate 3.6.4.Final

Status

Assignee

Unassigned

Reporter

Constantino Cronemberger GFT

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Minor
Configure