HHH-7829 NullPointerException when manually flushing One-To-One
relationship with orphan removal
This commit is contained in:
parent
1dca45f06f
commit
17e8bbc6b7
|
@ -256,6 +256,9 @@ public final class Cascade {
|
|||
final EntityEntry valueEntry = eventSource
|
||||
.getPersistenceContext().getEntry(
|
||||
loadedValue );
|
||||
// Need to check this in case the context has
|
||||
// already been flushed. See HHH-7829.
|
||||
if ( valueEntry != null ) {
|
||||
final String entityName = valueEntry.getPersister().getEntityName();
|
||||
if ( LOG.isTraceEnabled() ) {
|
||||
final Serializable id = valueEntry.getPersister().getIdentifier( loadedValue, eventSource );
|
||||
|
@ -269,6 +272,7 @@ public final class Cascade {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the association is a one to one in the logical model (either a shared-pk
|
||||
|
|
Loading…
Reference in New Issue