New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JPA 3.1 CriteriaBuilder Query exception #1554
Comments
provide full stacktrace, please |
@lukasj Attached the complete |
I added following test to
and it passed:
But looks like PreparedStatement was not used in your case. |
Looks like this was caused by 2 things:
|
Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
How about testing this? UUID id = entity.getId();
var cb = em.getCriteriaBuilder();
...
var param = cb.parameter(UUID.class);
query.where(cb.equal(root.get("id"), param));
List<?> result = em.createQuery(query).setParameter(param, id).getResultList(); Is it required that for UUID values, they MUST be bound as parameters and cannot be printed as literals in the query string? Is that platform specific? Is it not valid to print UUID values as string values (ie. |
My sample project used the following software.
The complete codes to reproduce the error: https://github.com/hantsy/jakartaee10-sandbox/blob/master/jpa/src/test/java/com/example/it/JPQLCriteriaBuilderTest.java#L155
Query:
The query execution caused the following exceptions.
The complete server log file is here.
server.log
The text was updated successfully, but these errors were encountered: