Skip to content

Commit 791152d

Browse files
committed
HHH-18617 Avoid reading unowned association key when filters are enabled
1 parent 4f9a42b commit 791152d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/ToOneAttributeMapping.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,8 +1583,7 @@ public static class EntityB {
15831583
}
15841584
}
15851585
else if ( hasNotFoundAction()
1586-
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null
1587-
|| affectedByEnabledFilters ) {
1586+
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null ) {
15881587
// For the target side only add keyResult when a not-found action is present
15891588
keyResult = foreignKeyDescriptor.createTargetDomainResult(
15901589
fetchablePath,

0 commit comments

Comments
 (0)