Skip to content

Commit 89fcee4

Browse files
committed
Rough sketch of a fix for HHH-18689
This is just an indication where a fix could be applied, but not understanding other (edge) cases, I don't think it should be applied as-is.
1 parent 3a3bfd5 commit 89fcee4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntityInitializerImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,12 @@ protected void resolveEntityInstance1(EntityInitializerData data) {
10871087
}
10881088
else {
10891089
data.setInstance( proxy );
1090+
/* uncommenting this branch fixes my situation (but might break others)
1091+
if ( data.entityHolder.isInitialized() ) {
1092+
data.setState( State.INITIALIZED );
1093+
data.entityInstanceForNotify = data.entityHolder.getEntity();
1094+
}
1095+
else */
10901096
if ( Hibernate.isInitialized( proxy ) ) {
10911097
data.setState( State.INITIALIZED );
10921098
data.entityInstanceForNotify = Hibernate.unproxy( proxy );

0 commit comments

Comments
 (0)