79635031

Date: 2025-05-23 07:28:01
Score: 2
Natty:
Report link

According to https://discourse.hibernate.org/t/criteriabuilder-cast-function-example/6631/4 there is a solution using cast instead of as:

var cast = ((JpaExpression) from.get("uuid")).cast(String.class);
cb.like(cast, "%" + stringValue + "%");
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: kio21