Answers for "Manual Custom Queries in spring boot"

0

Manual Custom Queries in spring boot

public interface UserRepository extends JpaRepository<User, Long> {

  @Query(value = "SELECT * FROM USERS WHERE LASTNAME = ?1",
    countQuery = "SELECT count(*) FROM USERS WHERE LASTNAME = ?1",
    nativeQuery = true)
  Page<User> findByLastname(String lastname, Pageable pageable);
}
Posted by: Guest on March-22-2021

Code answers related to "Manual Custom Queries in spring boot"

Browse Popular Code Answers by Language