In JPA (Hibernate), when we automatically generate the ID field, it is assumed that the user has no knowledge about this key. So, when obtaining the entity, user would query
We can add methods in Spring Jpa by passing diff params in methods like: List findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname);
// Enabling static ORDER BY for a query
List findByLastnameOrderByFirstnameAsc(String lastname);