-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-5247 - Support indexes and unique-keys in schema validator #11461
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
base: main
Are you sure you want to change the base?
Conversation
beikov
left a comment
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.
LGTM
| ExecutionOptions options, | ||
| Dialect dialect) { | ||
| var validationType = ConstraintValidationType.interpret( UNIQUE_KEY_VALIDATION, options.getConfigurationValues() ); | ||
|
|
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.
Maybe move this check up?
| if ( validationType == ConstraintValidationType.NONE ) { | |
| return; | |
| } |
| ExecutionOptions options, | ||
| Dialect dialect) { | ||
| var validationType = ConstraintValidationType.interpret( INDEX_VALIDATION, options.getConfigurationValues() ); | ||
|
|
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.
Maybe move this check up?
| if ( validationType == ConstraintValidationType.NONE ) { | |
| return; | |
| } |
| fail( "Not expecting an exception" ); | ||
| } | ||
| } | ||
| updateSchema( schema5, schemaTooling, registry ); |
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.
This seems to fail on Oracle because it can't match the index with the generated name IDX6vwh1addgrj8v4h4od0bey3th for persons (name) against the person_name index on the same column. Just wanted to give you this hint as I looked into the failure report.
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.
I'm not following. You mean with the ALL param? In that case, we are expecting a failure for exactly that reason.
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.
Oh, you mean on the schema-update?
HHH-5247 - Support indexes and unique-keys in schema validator
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-5247