Skip to content

Commit 7337b7a

Browse files
committed
Fix DefaultReactiveLoadEventListener#proxyImplementation
1 parent 5bf2af5 commit 7337b7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/event/impl/DefaultReactiveLoadEventListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ private CompletionStage<Object> loadWithRegularProxy(LoadEvent event, EntityPers
430430
private CompletionStage<Object> proxyImplementation(LoadEvent event, EntityPersister persister, EntityKey keyToLoad, LoadType options) {
431431
return load( event, persister, keyToLoad, options )
432432
.thenApply( optional -> {
433+
if (optional != null ) {
434+
return optional;
435+
}
433436
if ( options != LoadEventListener.INTERNAL_LOAD_NULLABLE ) {
434437
// throw an appropriate exception
435438
event.getSession().getFactory().getEntityNotFoundDelegate()

0 commit comments

Comments
 (0)