Skip to content
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

Not compatible with hibernate 6.6+ #168

Closed
itineric opened this issue Jan 3, 2025 · 1 comment · Fixed by #171
Closed

Not compatible with hibernate 6.6+ #168

itineric opened this issue Jan 3, 2025 · 1 comment · Fixed by #171

Comments

@itineric
Copy link
Contributor

itineric commented Jan 3, 2025

Migrating from hibernate 6.5.x to 6.6.x makes every cast of JSONB to text disapear and we just get postgresql errors (since jsonb is compared to varchar)
I came down to this commit in hibernate: hibernate/hibernate-orm@6a1581c
And especially this modification: hibernate/hibernate-orm@6a1581c#diff-7c30e62b623cc38a1c262664a4f0413f511d4d117b87be21c11e3f607983c090R101

This new code is called from inside RSQLJPAPredicateConverter.ResolveExpression when calling: return ResolvedExpression.ofPath(path.as(String.class), String.class);

In spring debug logs we can see

--- [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-4] i.g.p.rsql.RSQLJPAPredicateConverter     : Resolved expression: PathExpression[expression=org.hibernate.query.sqm.tree.expression.AsWrapperSqmExpression@3c6b6708, type=class java.lang.String]

With version 6.5.x of hibernate it was:

[org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#1-4] i.g.p.rsql.RSQLJPAPredicateConverter     : Resolved expression: PathExpression[expression=org.hibernate.query.sqm.function.SelfRenderingSqmFunction@7ac67a2a, type=class java.lang.String]

Maybe it is an hibernate issue or maybe this lib should adapt to the new code of hibernate?! Any clue maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant