Skip to content

Conversation

Aftermoon-dev
Copy link

@Aftermoon-dev Aftermoon-dev commented Oct 11, 2025

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

In internal/entities/mapper/relation/ToOneEntityLoader.java -> loadImmediate method checks @NotAudited through enversService.getEntitiesConfigurations().getNotVersionEntityConfiguration( entityName ) == null, but if set @Audited (targetAuditMode = RelationshipTargetAuditMode.NOT_AUDITED) in FK, it seems that the reason is that it is not checked.

I updated loadImmediate Method to check that part.


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.


…tMode = RelationTargetAuditMode.NOT_AUDITED) on FK fields'
@Aftermoon-dev Aftermoon-dev marked this pull request as draft October 12, 2025 08:28
@Aftermoon-dev Aftermoon-dev marked this pull request as ready for review October 12, 2025 08:49
@Aftermoon-dev
Copy link
Author

Aftermoon-dev commented Oct 12, 2025

I also added tests to check that the RelationTargetAuditNotfoundAction options (IGNORE, ERROR) work properly when applying the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants