Assuming I have a class A as follows:
class A{
int id;
int getId(){};
void setId(int id){};
}
And a class B as follows:
@Entity
@Table(name="B")
class B extends A{
string name;
@Column(length=20)
string getName(){}
void setName(){}
}
How can I annotate the inherited id field from A so that Hibernate/JPA knows it is the Id for the entity? I tried simply placing @Id on the field in A but this didn't work. I tried making A an entity as well and this also didn't work.