Skip to content

HHH-20779 Ensure to not pass proxy objects to Getter/Setter - #13202

Merged
beikov merged 2 commits into
hibernate:8.0from
beikov:HHH-20779-8.0
Aug 18, 2026
Merged

HHH-20779 Ensure to not pass proxy objects to Getter/Setter#13202
beikov merged 2 commits into
hibernate:8.0from
beikov:HHH-20779-8.0

Conversation

@beikov

@beikov beikov commented Aug 18, 2026

Copy link
Copy Markdown
Member

Backport of #13190


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

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

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

Apoorva Manjunath and others added 2 commits August 18, 2026 11:34
BaseEnversCollectionEventListener passed the raw collection element or
owner reference into CollectionChangeWorkUnit. When the session held the
related entity as an uninitialized proxy, the audit row was mapped off
the proxy wrapper by reflection field-reads, writing null for every
audited property of the MOD revision. Unwrap via
EntityTools.getTargetFromProxy, mirroring
BaseEnversEventListener#addCollectionChangeWorkUnit.

Originally reported at https://discourse.hibernate.org/t/12382
@hibernate-github-bot hibernate-github-bot Bot added the 8.0 Label for pull requests targeting [8.0] branch. label Aug 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
78.4% Coverage on New Code (required ≥ 80%)
5.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@beikov
beikov merged commit 8490200 into hibernate:8.0 Aug 18, 2026
34 checks passed
@beikov
beikov deleted the HHH-20779-8.0 branch August 18, 2026 11:40
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.

2 participants