Add petName field for form binding

This commit is contained in:
kaihang.xkh 2025-03-28 15:07:48 +08:00
parent d7ece043ac
commit 0f2eccc384

View file

@ -65,6 +65,13 @@ public class Owner extends Person {
@OrderBy("name")
private final List<Pet> pets = new ArrayList<>();
/**
* This field is used for form binding for pet search
* and is not persisted to the database.
*/
@jakarta.persistence.Transient
private String petName;
public String getAddress() {
return this.address;
}
@ -172,4 +179,12 @@ public class Owner extends Person {
pet.addVisit(visit);
}
}
public String getPetName() {
return this.petName;
}
public void setPetName(String petName) {
this.petName = petName;
}
}