Skip to content

HbmXmlTransformer: Various bug fixes#13111

Open
dreab8 wants to merge 14 commits into
hibernate:8.0from
dreab8:HHH-20699_HHH-20703_HHH-20709_HHH-20711_HHH-20712_HHH_20717_HHH-20715_8.0
Open

HbmXmlTransformer: Various bug fixes#13111
dreab8 wants to merge 14 commits into
hibernate:8.0from
dreab8:HHH-20699_HHH-20703_HHH-20709_HHH-20711_HHH-20712_HHH_20717_HHH-20715_8.0

Conversation

@dreab8

@dreab8 dreab8 commented Jul 24, 2026

Copy link
Copy Markdown
Member

Backport of

for 8.0


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-20717 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20715 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20712 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20711 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20709 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20703 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

Tasks specific to HHH-20699 (Bug):

  • Add test reproducing the bug
  • Add entries as relevant to migration-guide.adoc OR check there are no breaking changes

@dreab8 dreab8 added the 8.0 Label for pull requests targeting [8.0] branch. label Jul 24, 2026
@hibernate-github-bot

hibernate-github-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@sonarqubecloud

Copy link
Copy Markdown

@dreab8
dreab8 enabled auto-merge (rebase) July 25, 2026 08:23
dreab8 and others added 14 commits July 25, 2026 10:24
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-to-one instead of LAZY

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion-type attribute

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tions causing eager initialization

In hbm.xml, fetch="join" and lazy="true" are independent — the
collection stays lazy and uses join fetching only when initialized.
In orm.xml, fetch-mode="JOIN" maps to @fetch(FetchMode.JOIN) which
forces eager loading. Since a lazy collection uses a separate SELECT
regardless of fetch style, dropping fetch-mode="JOIN" preserves the
same runtime behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… many-to-one associations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ntities with inherited members

When an entity maps properties whose Java member is declared on a plain
superclass (not a mapped entity), the transformer now generates a
<mapped-superclass metadata-complete="true"> for that superclass and
moves the inherited attributes from the entity to the mapped-superclass.
Unmapped superclass properties are declared as <transient/>.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dreab8
dreab8 force-pushed the HHH-20699_HHH-20703_HHH-20709_HHH-20711_HHH-20712_HHH_20717_HHH-20715_8.0 branch from 269cd2e to 1ea13cf Compare July 25, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.0 Label for pull requests targeting [8.0] branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant