Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 311 Bytes

File metadata and controls

9 lines (7 loc) · 311 Bytes

JPQL via @Query

public interface PersonRepository extends JpaRepository<Person, Long> {

    @Query("select u from Person u where u.firstname = :firstname or u.lastname = :lastname")
    Person findByLastnameOrFirstname(@Param("lastname") String lastname, @Param("firstname") String firstname);
}