I have 3 tables represented by JPA model. The first one:
@MappedSuperclass
public abstract class BaseEntity {
@Id
private Long id;
private Boolean active;
}
Next class extends BaseEntity:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class Person extends BaseEntity{
private String name;
}
The last one is Student which extends Person:
@Entity
public abstract class Student extends Person{
private Integer grade;
}
So, I have field "active" both in Person and Student tables. I want that when I update field "active" through PersonRepository it also updates appropriate row in Student table. For now it updates only Person table. Is it possible?