Carr
0
Q:

https://www.baeldung.com/hibernate-inheritance

@MappedSuperclass
public class Person {
 
    @Id
    private long personId;
    private String name;
 
    // constructor, getters, setters
}
0
@Entity
public class MyEmployee extends Person {
    private String company;
    // constructor, getters, setters 
}
0

New to Communities?

Join the community