본문 바로가기
공부용/JPA

JPA

by 엑스포스 2017. 1. 5.
반응형
  1. Using Like: select ... like :username

    List<User> findByUsernameLike(String username);
  2. StartingWith: select ... like %:username

    List<User> findByUsernameStartingWith(String username);
  3. EndingWith: select ... like :username%

    List<User> findByUsernameEndingWith(String username);
  4. Containing: select ... like %:username%

    List<User> findByUsernameContaining(String username);


반응형