HHH-18484 Account for null generated values for no-op updates

This commit is contained in:
Marco Belladelli 2024-08-14 15:59:13 +02:00
parent 928c786683
commit 3001b7f01d
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ public class GeneratedValuesProcessor {
assert results.size() == 1;
setEntityAttributes( entity, state, results.get( 0 ) );
}
else {
castNonNull( generatedValues );
else if ( generatedValues != null ) {
// can be null when an update action resulted in a no-op (e.g. only changes to unowned association)
final List<Object> results = generatedValues.getGeneratedValues( generatedValuesToSelect );
setEntityAttributes( entity, state, results.toArray( new Object[0] ) );
}