-
Notifications
You must be signed in to change notification settings - Fork 11
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
Upgrade to hibernate-6.4.4 #359
Conversation
Hibernate 5.6 has a upperbound on op JDK 18 (19 or 20 worked well for us, but 21 did not -- then I reverted back to JDK17 to be sure), Hibernate 6.4 officially only works on JDK 11, 17 or 21 (recent LTSes; probably the in-betweens work as well). |
So the The So far I tracked the problem down to In GenericModel line: ParamNode beanNode = StringUtils.isEmpty(name) ? rootParamNode : rootParamNode.getChild(name, true); the But... This only happened when running from IntelliJ! From the command line the error was different. So I've concluded that somehow the The error I got from the command line was :
I'm still looking for way to fix this. So far setting I've been going about changing the liquibase files in |
Update:
Like I said: we do not use H2 or Liquibase so I'm not too invested in figuring out all the nitty-gritties of that combination of tools. It'd be great if we can move to Hibernate 6.4 as we like to stay current on the libraries. |
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: Cies <cies-AT@stager-DOT.nl>
You can always mark your PR as draft! |
I have successfully used this branch with our codebase. It's currently tested, but I expect no further problems. To get it to work we had to implement The reason we had to implement our own is that Hibernate 6+ changed the way that |
How about doing it the other way? Exactly as you did in your codebase:
Just implement the old behaviour for RePlay Framework, and document in the README if one would like to use the new behavior of Hibernate 6, then copy that This framework isn't supposed for new projects, instead for an intermediate step for leaving Play! 1 Framework. |
@xabolcs Hibernate changed the default behaviour and I cannot change it back from RePlay. To be able to change it back you need to override the default behaviour (with annotations) which is why I advocate for dropping There are more reasons to deprecate |
We've tested this and are now prod-testing this. I'll likely run this in production next week (2024w37). Once landed on production I'll make a new release of RePlay that includes this branch. |
Closes #358
This is merely a small PoC showing that it RePlay can compile and pass tests with Hibernate 6.4.
There are loooooads of deprecation warnings and I've ignored them on purpose. Most were already present in with Hibernate 5.6.
The main thing I changed is that we cannot get a connection from a Hibernate session in 6.4, the new way to use the connection of a specific session is with lambdas as explained here. Since I found no way to get the conneciton, I also removed the
getConnection()
method. This will be missed in our codebase in 4 places in which I can do the same trick with the lambdas. This makes is an API breaking change (if we were to uphold semver it'd need a big version number bump).While this branch builds
and the tests pass(more about failing test in conversation below), I'm not sure it is correct. I've not tested in our codebase (under production load). This branch/PR is for us to discuss, and look deeper into: if we're final on the how to implement this, I'm willing to test it on our staging env and after some time on with our production load.