1

In a query like this

predicates.add(cb.like(fromPet.get(Pet_.name), name));

It accepts "%" as a replacement for any amount of characters and "_" as a replacement for any single character.

is it possible to redefine these two wildcards-characters, for example with "*" instead of "%" and "?" instead of "_"?

I am aware that I could manually trace through pet.name and replace the characters on my own, but I was wondering if the JPA CriteriaBuilder supports custom wildcards.

0 Answers0