Skip to content

Commit a760f9a

Browse files
committed
HHH-18617 Avoid reading unowned association key when filters are enabled
1 parent 7211a9d commit a760f9a

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
@@ -1587,8 +1587,7 @@ public static class EntityB {
15871587
}
15881588
}
15891589
else if ( hasNotFoundAction()
1590-
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null
1591-
|| affectedByEnabledFilters ) {
1590+
|| getAssociatedEntityMappingType().getSoftDeleteMapping() != null ) {
15921591
// For the target side only add keyResult when a not-found action is present
15931592
keyResult = foreignKeyDescriptor.createTargetDomainResult(
15941593
fetchablePath,

0 commit comments

Comments
 (0)