Skip to content

Support @IdGeneratorType #2380

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Support @IdGeneratorType #2380

wants to merge 2 commits into from

Conversation

dreab8
Copy link
Member

@dreab8 dreab8 commented Jul 24, 2025

Fix #1906

@@ -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.
}

@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!
I gave it a quick look, but I will check better tomorrow

public void testPersist(VertxTestContext context) {
Person person = new Person();
test(
context, openSession()
Copy link
Member

Choose a reason for hiding this comment

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

Could you use getMutinySessionFactory.withTransaction?
I think it's more similar to a typical use case.

Maybe we could also test without transactions, but we should at least add a comment to explain what's going on

Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to also read the value from the database to make sure that they match? Maybe it's overkill

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.

Support @IdGeneratorType
2 participants