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 ability to add additional hibernate dialect for third party databases. #25792
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
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.
Thanks!
I added a few commits, mainly to:
- Move the newly introduced build item to a dedicated module for SPIs of the Hibernate ORM extension, because this really is about Hibernate ORM and not datasources/jdbc.
- Use the newly introduced build item for all core DB kinds. The main advantage is that we get testing of that build item for free, thanks to existing integration tests.
Unless @Sanne or @gsmet objects to the creation of a new module, let's merge this once CI agrees.
sounds good - no objections! Thanks :) |
This comment has been minimized.
This comment has been minimized.
…e this - all dialects was hardcoded in Dialects.java
Because dialects are metadata specific to Hibernate ORM.
…ateOrmMetadataBuildItem
These tests are not absolutely necessary since we have integration tests for each database kind, which would fail if we targeted a non-existing dialect. And we won't be able to (easily) execute those tests after the next commit anyway.
Merged! Thanks again @alexeysharandin , and good luck with your extension :) |
That is really cool! But the build item name isn't too friendly (
How about naming it simply UPDATE: Just saw that the original class was UPDATE 2: I created #25918, feel free to reject/close the PR if that doesn't make sense 😉 |
…ndDialectBuildItem` As suggested in quarkusio#25792 (comment)
…ndDialectBuildItem` As suggested in quarkusio#25792 (comment)
…ndDialectBuildItem` As suggested in quarkusio#25792 (comment)
That is a different build item. We didn't rename an existing build item, we added another one specifically for Hibernate ORM metadata.
Yes we would need another constructor. Which is much easier to do in a backwards compatible way than renaming the class. And that's something we've done multiple times in the Hibernate ORM extension.
That I can agree with : the name is very long 😀 Though I'm not sure the renaming is worth the trouble now that it's been merged and @alexeysharandin is probably already trying to use it. |
@yrodiere don't worry about me and naming. I'm waiting when this PR will be included to Quarkus 2.x and only after this can use this BuildItem. In this case - naming up to you :) |
At this moment all Hibernates dialects hardcoded in io.quarkus.hibernate.orm.deployment.Dialects
This PR first step of resolving comment in this class:
// For now select the latest dialect from the driver
// later, we can keep doing that but also avoid DCE
// of all the dialects we want in so that people can override them