I have a class AppUser
;
class AppUser {
private String firstName;
private String lastName;
//-- getters and setters
}
I also have another class Student
;
class Student {
private AppUser appUser;
private Date dateOfBirth;
//-- getters and setters
}
How would i search for Student John Doe
, firstName John, lastName Doe?
Had it been the date of birth property, i would create a Criteria
and add an equality Restriction (Restristions.eq
) on the date. How would i do it for lastName and firstName in the AppUser object?