Skip to content

Commit

Permalink
Fix filters
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanueleValentini1 committed Jul 22, 2024
1 parent 988e579 commit 569e62e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public PanacheQuery<User> findAllCustom() {
public Uni<PageInfo<User>> findByFilters(Map<String, Object> params, int pageIndex, int pageSize) {
StringBuilder query = new StringBuilder("select distinct u from User u left join fetch u.userProfiles up where 1=1 ");

params.forEach((key, value) -> query.append("and u.").append(key).append(" = :").append(key).append(" "));
params.forEach((key, value) -> query.append("and lower(u.").append(key).append(")").append(" LIKE lower(concat(concat(:" + key + "), '%'))"));

query.append("order by u.lastUpdatedAt DESC");

Expand Down

0 comments on commit 569e62e

Please sign in to comment.