mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 05:04:52 +00:00
HHH-17256 Elementcollection embeddable contains only nulls when loading in multiple steps
This commit is contained in:
parent
23194aac1c
commit
b79181e918
@ -8,14 +8,12 @@
|
||||
|
||||
import org.hibernate.engine.internal.ManagedTypeHelper;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.metamodel.internal.AbstractCompositeIdentifierMapping;
|
||||
import org.hibernate.metamodel.mapping.CompositeIdentifierMapping;
|
||||
import org.hibernate.metamodel.mapping.EmbeddableMappingType;
|
||||
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
|
||||
import org.hibernate.metamodel.mapping.ForeignKeyDescriptor;
|
||||
import org.hibernate.metamodel.mapping.VirtualModelPart;
|
||||
import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping;
|
||||
import org.hibernate.metamodel.mapping.internal.EmbeddedIdentifierMappingImpl;
|
||||
import org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart;
|
||||
import org.hibernate.metamodel.spi.ValueAccess;
|
||||
import org.hibernate.property.access.spi.PropertyAccess;
|
||||
import org.hibernate.proxy.HibernateProxy;
|
||||
@ -271,7 +269,7 @@ else if ( !entityInitializer.getConcreteDescriptor().isTypeOrSuperType( embedded
|
||||
// parent instance is of a supertype which doesn't contain this embeddable
|
||||
return State.NULL;
|
||||
}
|
||||
else if ( entityInitializer.isEntityInitialized() ) {
|
||||
else if ( entityInitializer.isEntityInitialized() && !(embedded instanceof EmbeddedCollectionPart )) {
|
||||
// parent instance has been initialized, we do not need to inject the state
|
||||
return State.INJECTED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user