-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 ORM 6.2 #31235
Upgrade to Hibernate ORM 6.2 #31235
Conversation
/cc @yrodiere (hibernate-orm) |
ba71a11
to
01a4f5e
Compare
22fc48b
to
8b6c1cd
Compare
🙈 The PR is closed and the preview is expired. |
Updated the description trying to capture the latest status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see this reach the main repo :)
I added a few comments following my first pass.
...m/deployment/src/test/java/io/quarkus/hibernate/orm/packages/PackageLevelAnnotationTest.java
Outdated
Show resolved
Hide resolved
...m/deployment/src/test/java/io/quarkus/hibernate/orm/packages/PackageLevelAnnotationTest.java
Outdated
Show resolved
Hide resolved
...java/io/quarkus/hibernate/orm/runtime/boot/registry/PreconfiguredServiceRegistryBuilder.java
Outdated
Show resolved
Hide resolved
...ain/java/io/quarkus/hibernate/orm/runtime/devconsole/HibernateOrmDevConsoleInfoSupplier.java
Outdated
Show resolved
Hide resolved
.../java/io/quarkus/hibernate/orm/runtime/service/QuarkusMutableIdentifierGeneratorFactory.java
Outdated
Show resolved
Hide resolved
...va/io/quarkus/hibernate/orm/runtime/service/QuarkusSimplifiedIdentifierGeneratorFactory.java
Show resolved
Hide resolved
We got all integration tests working, and all comments addressed - marking as no longer a draft |
N.B. native image isn't going to prune unreachable data which we're referencing in the heap AFAIK; the dead code elimination applies to code only - possibly constants if they are stored in classes which don't get initialized. So the metadata costs you're pointing to are most likely applicable even if the user doesn't have specific code triggering it. |
This still means it will prune unreachable code if there's no way this Not sure there would be a big difference, though... |
If an instance of a class X is present in the heap which gets captured in the image (just one reference to it is enough), then the whole class definition and all its methods is included as well - including all other symbols that might be reached from there. So if And that's why I've been working occasionally by inspecting heap dumps in Eclipse MAT :) So what we need to do is to encode the knowledge that you might be able to infer from our code into a shape that the compiler can also nail it - without breaking semantics. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in and improve further in follow-up PRs.
Thanks @gsmet ! |
Switching to Hibernate 6 will be a big thing for Quarkus 3 users. Are you planning to list the key changes and link Hibernate migration guides in https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#jpa--hibernate-orm? Or there will be a dedicated page for Hibernate move? |
Yes, we'll need to spend some time on documentation and migrations in particular for sure. |
quarkusio/quarkus#31235 upgraded Hibernate to version 6.2. org.hibernate.annotations.ParamDef#type now accepts Class instead of plain string. Also hibernate sequence generator needs some enhances and define the increment values on the migration SQL scripts
quarkusio/quarkus#31235 upgraded Hibernate to version 6.2. org.hibernate.annotations.ParamDef#type now accepts Class instead of plain string. Also hibernate sequence generator needs some enhances and define the increment values on the migration SQL scripts
@Sanne who is the go-to person when you are focused on Hibernate Reactive? We need somebody who will look into migration troubles and help people to adjust their apps and deployments the right way. Are there any docs that could be used as the starting point right now? |
Hi @rsvoboda; @DavideD and @gavinking are the main experts for Hibernate Reactive - I'd say it's early days though, we haven't released a first Alpha of Hibernate Reactive 2.0 yet and there isn't a migration guide yet. In many ways I expect the migration to Hibernate Reactive 2.0 actually to be simpler than the Hibernate ORM 6.2 one: other than it being now based on Jakarta, the APIs we expose so far haven't changed at all. It does inherit the changes in mapping and configuration properties that impacted ORM though. |
@Sanne I was thinking about Hibernate ORM 6.2 in my previous comment. |
Found these for HHH:
Is there anything for Quarkus or that's tbd? |
I'm confused now. You specifically asked about But yes the links you found are the relevant ones, for both ORM "classic" and Reactive. But don't take them as final documents, they are live wikis and they're evolving as we speak - especially as community members try, when we find discrepencies it's being updated. From the Quarkus side, it's TBD. I don't think we'll want to replicate all the content from the Hibernate wiki, but we might want to call out some particular sections which are more important than others. At very least we should link to it. |
:) I asked |
Upgrades the project to use Hibernate ORM 6 - at cost of not having a matching Hibernate Reactive at the moment.
Hibernate Reactive is making progress quickly towards 2.0, which is meant to be compatible with ORM 6.2, but it's not there yet; we need to harden and improve the ORM6 integration first so people will have to temporarily live w/o Hibernate Reactive - hopefully it won't take long to catch up.
Some more technical debt:
Some notes on the history: it's long but I've tried hard to keep my commits clean; in fact they have been rewritten and re-squashed multiple times so to be focused on atomic needs.