-
-
Notifications
You must be signed in to change notification settings - Fork 101
Add support for @IdGeneratorType
#2486
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
This commit : - Deprecate GeneratedValuesMutationDelegateAdaptor because no longger used - Introduce ReactiveGetGeneratedKeysDelegate so avoid adapting the SQL String for Mysql and Oracle - Add support for multi value generation for dialects not supporting returning clause - Deprecate ReactiveConnection insertAndSelectIdentifier and insertAndSelectIdentifierAsResultSet methods in favour of methods supporting multi generated value - Implement ReactiveBasicSelectingDelegate for dealing with Identity columns where the dialect requires an additional command execution to retrieve the generated value - Implement ReaCtiveUniqueKeySelectingDelegate that uses a unique key of the inserted entity to locate the newly inserted row.
It doesn't seem to have any purpose at the moment
It makes it easier to remove the hack once the issue in Hibernate ORM is solved: https://hibernate.atlassian.net/browse/HHH-19717
@@ -38,4 +42,18 @@ | |||
default CompletionStage<Id> generate(ReactiveConnectionSupplier session, Object owner, Object currentValue, EventType eventType) { | |||
return generate( session, owner ); | |||
} | |||
|
|||
@Override |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
generate
} | ||
|
||
@Override | ||
default Object generate(SharedSessionContractImplementor session, Object object){ |
Check notice
Code scanning / CodeQL
Confusing overloading of methods Note
generate
…utationDelegateIdentityTest update query assertions
Hi @DavideD I added a comment to |
Closes #1906
This is PR #2476 with a few extra commits.
It's just a bit of refactoring that also removes some unused or wrongly included code (probably).
@dreab8, please, could you check these things and let me know if they make sense:
Regarding the tests there are a couple of things that I don't understand.
Why are we checking if the quey contains "update"? Because if we take a test as example, the query looks like this:
Is the intent to test that it contains the column
updateDate
or anupdate
sql command? We should at least add a commentthere's a method called
assertNumberOfOccurrenceInQueryNoSpace
that I don't undestand what it does. Could you add a javadoc with an example of the queries? Maybe specify which databases we support actually run that check.Also the assertions looks like this:
Meaning that a message error looks like this
org.opentest4j.AssertionFailedError: [number of data]
I suppose it should be:
I think we can merge this PR and close the issue for now (after a review of the extra commits). But let me know.