Skip to content

HHH-20414 - Deprecated generator removals#13049

Open
jrenaat wants to merge 4 commits into
hibernate:wip/9.0from
jrenaat:HHH-20414-deprecated_generator_removals
Open

HHH-20414 - Deprecated generator removals#13049
jrenaat wants to merge 4 commits into
hibernate:wip/9.0from
jrenaat:HHH-20414-deprecated_generator_removals

Conversation

@jrenaat

@jrenaat jrenaat commented Jul 10, 2026

Copy link
Copy Markdown
Member

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-20414 (Remove Feature):

  • Add test OR check there is no need for a test
  • 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-20414

Removed the deprecated ForeignGenerator class which was marked for
removal in version 9. The functionality is replaced by the JPA-standard
@mapsid annotation.

Changes:
- Removed ForeignGenerator class
- Removed "foreign" generator strategy from GeneratorStrategies
- Updated JavaDoc to reference @mapsid instead of ForeignGenerator
- Migrated test entities from @GenericGenerator to @mapsid

The core getForeignId() helper method is preserved as it's still used
by PropertyBinder to implement @mapsid functionality.

Migration path for users:
  Old: @GenericGenerator(type = ForeignGenerator.class,
                          parameters = @parameter(name="property", value="owner"))
  New: @mapsid

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@hibernate-github-bot hibernate-github-bot Bot added the wip/9.0 Label for pull requests targeting [wip/9.0] branch. label Jul 10, 2026
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
@sebersole

Copy link
Copy Markdown
Member

Looks reasonable to me so far

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
Comment thread documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc Outdated

@sebersole sebersole left a comment

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.

Minor doc change, but otherwise looks good

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
@jrenaat
jrenaat force-pushed the HHH-20414-deprecated_generator_removals branch from 2c13192 to ddbd513 Compare July 17, 2026 17:27
@jrenaat
jrenaat marked this pull request as ready for review July 17, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wip/9.0 Label for pull requests targeting [wip/9.0] branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants