-
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
Allow setting additional Hibernate quoting options #30184
Allow setting additional Hibernate quoting options #30184
Conversation
dadac90
to
872d15e
Compare
This comment has been minimized.
This comment has been minimized.
872d15e
to
4c8ea5e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
4c8ea5e
to
5c2de01
Compare
The existing case was extended by adding a column with a reserved name and column definition. So, that situation is resolved by activating @yrodiere @Sanne, the workflow can resume now if the changes are ok. |
5c2de01
to
a679264
Compare
I'm thinking if creating a config group for the quoting options would be a better approach. quarkus.hibernate-orm.quote.all-identifiers=true
quarkus.hibernate-orm.quote.skip-column-definitions=true
quarkus.hibernate-orm.quote.auto-keywords=true
quarkus.hibernate-orm.quote.auto-initial-underscore=true The first option can allow to remove or deprecate the What do you think? |
@brunolmfg +1 I like your idea of grouping the "quoting" properties |
This comment has been minimized.
This comment has been minimized.
a679264
to
c279940
Compare
I've created the group 'quote' for persistence unit configurations. Also, a warning will be emitted when enabling |
c279940
to
6c419ac
Compare
Branch rebased with latest main. Waiting workflow if changes are ok. |
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.
Tests look good, but I'm not sure about the configuration property structure, could you have a look at my comment?
...ent/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfigPersistenceUnit.java
Outdated
Show resolved
Hide resolved
...-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
Outdated
Show resolved
Hide resolved
...-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
Outdated
Show resolved
Hide resolved
6c419ac
to
ab409bf
Compare
The branch was rebased with the latest main and changes discussed during the review. |
ab409bf
to
f3e702b
Compare
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.
Looking great, thanks!
I have a few suggestions about wording in the documentation, but I'm not a native English speaker, so... feel free to ignore.
...ent/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfigPersistenceUnit.java
Outdated
Show resolved
Hide resolved
...ent/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfigPersistenceUnit.java
Outdated
Show resolved
Hide resolved
f3e702b
to
79319f6
Compare
I'm not too. 😅 But your suggestions seem clearer, so I've accepted and applied them. |
This comment has been minimized.
This comment has been minimized.
Deprecate the property `globally-quoted-identifiers` indicating to use `quote-identifiers.strategy` property. It can be possible to skip column definitions when quoting identifiers or quote only the deemed keywords.
79319f6
to
d0c7706
Compare
Merged, thanks! |
I mentioned the deprecation in the migration guide: |
@yrodiere thanks for merging! But wouldn't the correct migration page be 2.17? Or do you intend to backport to 2.16 as well? |
@brunolmfg Damn, you're right. Good catch. I'll fix that. |
And no I don't intend to backport this, since it's more of a new feature. Thanks for your work! |
@yrodiere Considering the property |
@brunolmfg Personally I would remove it in Quarkus 4. I don't see any rush. |
Fixes #28593
This implementation will allow to set additional quoting options available in Hibernate mapping properties.
Today, only enabling global quoting all identifiers is allowed by Hibernate ORM and Hibernate Reactive extensions. Now, it will be possible to enable the useful quoting options in both extensions setting the property
.quote-identifiers.strategy
with one of the available strategies:none
all
all-except-column-definitions
only-keywords
The current property
.database.globally-quoted-identifiers
has been marked as deprecated in favor of.quote-identifiers.strategy
.Note: There is no documentation specific for
globallyQuotedIdentifiers
configuration, so the new property are absent either.