-
Notifications
You must be signed in to change notification settings - Fork 38.4k
HibernateJpaDialect compatibility with Hibernate 6 (read-only transactions etc) #28007
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
Comments
We aim for a complete Hibernate 6.0 support story in our own 6.0 M3, not sure yet how far we'll go (native API via That said, it's definitely worth considering what we could do in 5.3.x to allow for using Hibernate 6.0 with our JPA support at least. We might want to leniently tolerate it at runtime for a start, even without full alignment yet. Let's use this ticket for it. |
Once I avoided read-only transactions by rather using a simple Oh, H6 is JakartaEE based. I guess that is a showstopper for any support of it in our 5.x generation. |
Good point, there's no classic JPA binding for it anymore, it's exclusively built on |
Alright, so we'll definitely sort out |
I just realized that the API I found and suggested as workaround (never tested using it myself, though) also already exists in 5.6.5. I.e. we could try to just move that in 6.0 but stick to the Hibernate 5.x baseline. |
It turns out that it is indeed straightforward to support both Hibernate 5.6 and 6.0 through a revision of The other area affected is From that perspective, we seem to be covered in terms of JPA compatibility, so I'll close this ticket right away. The main remaining part for #22128 is whether we want/need an |
Thanks for that, Jürgen. Verified working as expected now! 🙇 |
During our work to investigate the compatibility with Hibernate 6 in Spring Data JPA we ran into an issue surfacing in Spring Frameworks transaction management:
In
….beginTransaction(…)
,HibernateJpaDialect
callsSessionImplementor.connection()
a method that has been removed in CR1 (could've been in one of the betas already, I didn't check) to issue read-only transactions. It looks like the new way to access theConnection
is calling….getJdbcConnectionAccess().obtainConnection()
.Related tickets:
The text was updated successfully, but these errors were encountered: