Skip to content

Conversation

dreab8
Copy link
Member

@dreab8 dreab8 commented Aug 28, 2025

and fix few issues with OnExecutionGenerators

@DavideD not sure about the changes I made to MutinySessionImpl.java and StageSessionImpl I needed the PersistenceContext in a couple of tests.

Also not sure about the name of this method executeSqlAndSelectGeneratedValuesAsResultSet feel free to propose a better one.

@@ -38,4 +41,18 @@
default CompletionStage<Id> generate(ReactiveConnectionSupplier session, Object owner, Object currentValue, EventType eventType) {
return generate( session, owner );
}

@Override
default Id generate(

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method ReactiveIdentifierGenerator.generate(..) could be confused with overloaded method
generate
, since dispatch depends on static types.
@dreab8 dreab8 force-pushed the issue#1906_4 branch 3 times, most recently from ffe4377 to 7fdf4fe Compare August 29, 2025 09:39
}

@Override
default Object generate(SharedSessionContractImplementor session, Object object){

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method ReactiveIdentifierGenerator.generate(..) could be confused with overloaded method
generate
, since dispatch depends on static types.
Copy link
Member

@DavideD DavideD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Looks great.

I proposed some changes, but I think we could move it from draft to Ready for review.
Unless you think there's something missing that needs to be done before we can merge it.

Copy link
Member

@gavinking gavinking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions.

@dreab8 dreab8 marked this pull request as ready for review September 2, 2025 09:46
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.
@DavideD
Copy link
Member

DavideD commented Sep 2, 2025

Looks good @dreab8, thanks a lot.

I've included a couple of extra remarks in this PR: #2486

@DavideD DavideD closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants