File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1630,9 +1630,12 @@ else if ( hasNotFoundAction()
1630
1630
final boolean selectByUniqueKey = isSelectByUniqueKey ( side );
1631
1631
1632
1632
// Consider all associations annotated with @NotFound as EAGER
1633
+ // and LAZY one-to-one that are not instrumented and not optional
1633
1634
if ( fetchTiming == FetchTiming .IMMEDIATE
1634
1635
|| hasNotFoundAction ()
1635
- || getAssociatedEntityMappingType ().getSoftDeleteMapping () != null ) {
1636
+ || getAssociatedEntityMappingType ().getSoftDeleteMapping () != null
1637
+ || ( !entityMappingType .getEntityPersister ().isInstrumented ()
1638
+ && cardinality == Cardinality .ONE_TO_ONE && isOptional ) ) {
1636
1639
return buildEntityFetchSelect (
1637
1640
fetchParent ,
1638
1641
this ,
You can’t perform that action at this time.
0 commit comments