我遇到了从母类绑定继承属性的问题。
我有一个实体Person
和Staff
,其中课程staff
延伸person
:
public abstract class Person {
private String firstName;
private String lastName;
private String phone;
//... getters and setters ... //
}
和
public class Staff extends Person {
private String identificationCode;
private UnavailabilityReason reason;
private Address address;
//... getters and setters ... //
}
我有一个用于编辑员工的表单,我成功绑定了identificationCode, reason and address
但没有firstName, lastName and phone
有人可以帮助我吗?