-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support for Hibernate CTE in HQL parser #2981
Comments
Until the HQL parser gets updated for Hibernate 6.2, is there a way to disable the query parser for specific queries? |
There isn't any way to disable the query parser. You can work around this with a custom implementation. Check out https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.custom-implementations for more details on how to hook such a solution into your repository. However, it won't take long for me to add support. |
Merged to |
Hi @gregturn / @clementdenis can you please point me to examples of using CTE with Spring Data JPA + Hibernate. I am getting exception
More Details on https://stackoverflow.com/questions/78004995/cte-usage-with-spring-data-jpa-3-2-hibernate-6-4-does-not-work . Hibernate Query checks is expecting to define an Entity for name of CTE . |
polite bump |
Thank you @Aniket-Singla / @CatPlanet for getting in touch - We prefer to use GitHub issues only for bugs and enhancements. If you encounter problems with the data-jpa integration (something that cannot be reproduced with plain hibernate) please create a new issue, potentially linking to this closed one. Also make sure to provide more context - ideally take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem. |
Hibernate 6.2 introduced CTE support.
But in Spring Data JPA 3.1 (that depends on Hibernate 6.2); such queries are rejected by the HQL parser:
My query here works just fine when creating the query directly with the entity manager.
The text was updated successfully, but these errors were encountered: