79155669

Date: 2024-11-04 13:50:47
Score: 1
Natty:
Report link

The solution was to add an escape character:

criteriaBuilder.like(file.get("name"), "%" + filename + "%", '\\');

Otherwise, wildcards such as % or _ won't get treated as wildcards.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Noel93