From fc1d3804151f6958144cfa0e0d7cabdc103ff837 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Wed, 18 Sep 2024 17:35:01 +0200 Subject: [PATCH] HHH-18631 AssertionError when loading an entity after removing another, associated entity --- .../entity/internal/EntityInitializerImpl.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntityInitializerImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntityInitializerImpl.java index 5fd5ffba2d..eb681aafbc 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntityInitializerImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/internal/EntityInitializerImpl.java @@ -87,7 +87,6 @@ import static org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer.UNFETCH import static org.hibernate.engine.internal.ManagedTypeHelper.asPersistentAttributeInterceptable; import static org.hibernate.engine.internal.ManagedTypeHelper.isPersistentAttributeInterceptable; import static org.hibernate.internal.util.NullnessUtil.castNonNull; -import static org.hibernate.metamodel.mapping.ForeignKeyDescriptor.Nature.TARGET; import static org.hibernate.proxy.HibernateProxy.extractLazyInitializer; /** @@ -914,12 +913,15 @@ public class EntityInitializerImpl extends AbstractInitializer