mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 05:04:52 +00:00
HHH-17156 Skip initialization for different subtype embeddables
This commit is contained in:
parent
af24f1dd1d
commit
bea9d12115
@ -267,6 +267,10 @@ private State determinInitialState(){
|
||||
// parent instance is null;
|
||||
return State.NULL;
|
||||
}
|
||||
else if ( !entityInitializer.getConcreteDescriptor().isTypeOrSuperType( embedded.findContainingEntityMapping() ) ) {
|
||||
// parent instance is of a supertype which doesn't contain this embeddable
|
||||
return State.NULL;
|
||||
}
|
||||
else if ( entityInitializer.isEntityInitialized() ) {
|
||||
// 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