Announcement Announcement Module
Collapse
No announcement yet.
Using JPQL "functional expressions" with Spring Data JPA "query methods"? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using JPQL "functional expressions" with Spring Data JPA "query methods"?

    Is it possible to use JPQL "functional expressions" inside of Spring Data JPA "query methods"?

    For example, to express the following JPQL:
    SELECT u FROM User u WHERE lower(u.username) LIKE :username
    is there something like
    List<User> findByLowerUsernameLike(String username)
    ?

  • #2
    Not knowing the answer, I tested the following which essentially does the same thing:

    Code:
    List<User> findByFirstnameLikeIgnoreCase(String like);
    It works.

    See Query Creation in the Spring Data Reference.

    Comment

    Working...
    X