Skip to content

HHH-20737 Add support for batch generation of values - #13158

Open
beikov wants to merge 1 commit into
hibernate:mainfrom
beikov:HHH-20737
Open

HHH-20737 Add support for batch generation of values#13158
beikov wants to merge 1 commit into
hibernate:mainfrom
beikov:HHH-20737

Conversation

@beikov

@beikov beikov commented Aug 5, 2026

Copy link
Copy Markdown
Member

[Please describe here what your change is about]


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.



Please make sure that the following tasks are completed:
Tasks specific to HHH-20737 (Improvement):

  • Add tests for feature/improvement
  • Update documentation as relevant: javadoc for changed API, documentation/src/main/asciidoc/userguide for all features, documentation/src/main/asciidoc/introduction for main features, links from existing documentation
  • Add entries as relevant to migration-guide.adoc (breaking changes) and whats-new.adoc (new features/improvements)

https://hibernate.atlassian.net/browse/HHH-20737

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
54.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment on lines +94 to +97
insertMutationPlanner.preInsertInMemoryValueGeneration(
state, entity, session,
decompositionContext != null ? decompositionContext.getBatchGenerationContext() : null
);

@sebersole sebersole Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I find this syntax confusing. It combines multiple arguments on one line and then splits a single argument on another.

Suggested change
insertMutationPlanner.preInsertInMemoryValueGeneration(
state, entity, session,
decompositionContext != null ? decompositionContext.getBatchGenerationContext() : null
);
insertMutationPlanner.preInsertInMemoryValueGeneration(
state,
entity,
session,
decompositionContext != null ? decompositionContext.getBatchGenerationContext() : null
);

In fact, I'd make this whole statement -

		final boolean hasStateDependentGenerator = insertMutationPlanner.preInsertInMemoryValueGeneration(
				state, 
				entity, 
				session,
				decompositionContext != null ? decompositionContext.getBatchGenerationContext() : null
		);

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.

2 participants