HHH-17652 Fix NullPointerException when mapping audited many-to-one relationships

fixes b384b37f39
This commit is contained in:
Kovács Ádám 2024-01-18 16:29:42 +01:00 committed by GitHub
parent 43627332cf
commit a2640a69e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,9 @@ public class ToOneIdMapper extends AbstractToOneMapper {
EntityInfo referencedEntity,
Map data,
Object primaryKey) {
if (referencedEntity.isAudited()) {
return false;
}
final String referencingEntityName = enversService.getEntitiesConfigurations()
.getEntityNameForVersionsEntityName( (String) data.get( "$type$" ) );