Closed tcordel closed 3 months ago
Thank you @tcordel for raising the issue and providing the sample project.
Unfortunately there's not much we can do from a spring-data side. Like you already said, this is a hibernate issue that can be reproduced with plain JPA.
While everything works fine using equal(Expression<?> x, Object y)
, things start to fail in this case once a ParameterExpression
is used as outlined below.
Root<Entity> root = criteriaQuery.from(Entity.class);
ParameterExpression<Date> createDateParameter = criteriaBuilder.parameter(Date.class);
TypedQuery<Entity> query = entityManager.createQuery(criteriaQuery.where(criteriaBuilder.equal(root.get("creationDate"), createDateParameter)));
query.setParameter(createDateParameter, creationDate);
I recommend to get in touch with the hibernate team, maybe providing the minimalist possible reproducer that only contains the required hibernate/JPA parts.
Hi,
First of all, i apologize in advance if this is not the right place to publish or if this report is shitty :sob:.
We face an issue using Spring data jpa queries with parameters refering to field having an @jakarta.persistence.Convert strategy. For the convinience, I have initialized a small project presenting the default, you may find it here. This issue is surely caused by HHH-17595
the stack :
Thanks in advance,