Skip to content

HbmXmlTranslator: Various bug fixes#13105

Closed
dreab8 wants to merge 14 commits into
hibernate:mainfrom
dreab8:HHH-20699_HHH-20703_HHH-20709_HHH-20711_HHH-20712_HHH-20715_HHH_20717
Closed

HbmXmlTranslator: Various bug fixes#13105
dreab8 wants to merge 14 commits into
hibernate:mainfrom
dreab8:HHH-20699_HHH-20703_HHH-20709_HHH-20711_HHH-20712_HHH-20715_HHH_20717

Conversation

@dreab8

@dreab8 dreab8 commented Jul 23, 2026

Copy link
Copy Markdown
Member
  • HHH-20699 HbmXmlTransformer sets EAGER fetch on composite-id key-many-to-one instead of LAZY

  • HHH-20703 HbmXmlTransformer does not resolve typedef alias for collection-type attribute

  • HHH-20709 HbmXmlTransformer generates fetch-mode=JOIN for lazy collections causing eager initialization

  • HHH-20711 HbmXmlTransformer does not support composite-id with id-class

  • HHH-20712 HbmXmlTransformer does not transfer on-delete="cascade" for many-to-one associations

  • HHH-20715 HbmXmlTransformer does not generate mapped-superclass for entities with inherited members

  • HHH-20717 xml elements are parsed but never processed

  • HHH-20717 HbmXmlTransformer does not set the required rename attribute for


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 and others added 14 commits July 23, 2026 16:19
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 closed this Jul 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
78.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

1 participant