Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

hibernate select lowercase

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    @Query("select u from User u where lower(u.username) = lower(?1)")
    Optional<User> findByUsername(String username);
}
 
PREVIOUS NEXT
Tagged: #hibernate #select #lowercase
ADD COMMENT
Topic
Name
6+6 =