-
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
Delegate detection of the database version to the Hibernate ORM dialect #43764
Draft
yrodiere
wants to merge
9
commits into
quarkusio:main
Choose a base branch
from
yrodiere:i43703
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quarkus-bot
bot
added
area/dependencies
Pull requests that update a dependency file
area/devtools
Issues/PR related to maven, gradle, platform and cli tooling/plugins
area/documentation
area/hibernate-orm
Hibernate ORM
area/hibernate-reactive
Hibernate Reactive
area/jdbc
Issues related to the JDBC extensions
labels
Oct 8, 2024
/cc @gsmet (hibernate-orm) |
yrodiere
removed
area/dependencies
Pull requests that update a dependency file
area/devtools
Issues/PR related to maven, gradle, platform and cli tooling/plugins
area/jdbc
Issues related to the JDBC extensions
labels
Oct 8, 2024
quarkus-bot
bot
added
area/dependencies
Pull requests that update a dependency file
area/devtools
Issues/PR related to maven, gradle, platform and cli tooling/plugins
area/jdbc
Issues related to the JDBC extensions
labels
Oct 8, 2024
This allows disabling the check on startup if one knows the database won't be reachable. It also currently defaults to being disabled when a dialect is set explicitly (`quarkus.hibernate-orm.dialect=something`), in order to work around problems we have with correctly detecting the version on some databases that we don't have tests for (unsupported ones).
First because there's no reason not to (we're not testing the behavior for unmapped attributes), and second to work around a bug in Hibernate ORM 7.0 alphas/betas: https://hibernate.atlassian.net/browse/HHH-18662
…ersistenceProvider Not strictly necessary, but doesn't hurt and might allow more changes in the next commits.
Because: 1. We currently disallow this for identifier generators only through a custom initializer for the identifier generator factory service, but that service is disappearing in Hibernate ORM 7.0.0.Beta1, leaving us only the setting `hibernate.cdi.extensions`. to disallow CDI for identifier generators -- and anything else that impacts metadata creation. 2. This is needed for quarkusio#40897, which will move more of metadata creation to build time -- where CDI is just not available. 3. Implementations of affected components needing access to CDI at runtime (so not during metadata creation) can still do so by calling `Arc.container()` to retrieve the relevant beans.
…equired dependencies With Derby moving to hibernate-community-dialects, Quarkus will need to add this dependency automatically.
Because some dialects have very specific ways of detecting the version, such as running some SQL, that work better than asking the JDBC driver.
…licit Hibernate ORM dialects Because that detection is now done by the Hibernate ORM dialect itself, and should work properly for all dialects.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/dependencies
Pull requests that update a dependency file
area/devtools
Issues/PR related to maven, gradle, platform and cli tooling/plugins
area/documentation
area/hibernate-orm
Hibernate ORM
area/hibernate-reactive
Hibernate Reactive
area/jdbc
Issues related to the JDBC extensions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #43703
Fixes #42255
Based on #41310 and #43762, which must be merged first. Critically, #41310 requires Hibernate ORM 7.0.0.Final to be released, so we won't be able to merge this PR for a while. I'm submitting it anyway as a draft, so that we remember it's that easy: only the last two commits will be needed after we rebase.