Skip to content

Commit

Permalink
HHH-17156 Skip initialization for different subtype embeddables
Browse files Browse the repository at this point in the history
  • Loading branch information
mbladel committed Sep 18, 2023
1 parent 32605a5 commit b38bc76
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b38bc76

Please sign in to comment.