Home » Java » java – How to create a case-insensitive "LIKE" query with the Critiera API?-Exceptionshub

java – How to create a case-insensitive "LIKE" query with the Critiera API?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

How can I create a query with a case-insensitive LIKE condition using the Criteria API?

predicates.add(cb.like(root.get("target"), "%" + target + "%"));
How to&Answers: