Hi,
I've a class Person and a class Employee (extends Person width strategy JOINED). Like bellow:
Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "person")
public class Person {
}
@Entity
@Table(name = "employee")
public class Employee extends Person {
}
That in database I have many Person already saved.
Then, on enter the person tax id, I verify if exists it into database and load the person properties to the new instance of Employee (including id, the primary key is foreign key).
But when I merge the Employee, the id is ignored and other generated (next id), and in person table duplicate the row.
Thanks.