I added a test to replicate this issue. Gail Badner, I think you are interested in this. I took a look at it and the issue is caused by nulling the entityEntry.deletedState:
public void nullifyTransientReferences(final Object[] values, final Type[] types) {
for ( int i = 0; i < types.length; i++ ) {
values[i] = nullifyTransientReferences( values[i], types[i] );
}
}
Now, if we don't do this, then Hibernate will try to delete the Parent row without deleting the child record first. |