event.getOldState() returns NULL and this causes the NullPointer...
line 86 ( newDbState[i] = event.getOldState()[i]; )
privateObject[] postUpdateDBState(PostUpdateEvent event) {
Object[] newDbState = event.getState().clone();
EntityPersister entityPersister = event.getPersister();
for ( int i = 0; i < entityPersister.getPropertyNames().length; ++i ) {
if ( !entityPersister.getPropertyUpdateability()[i] ) {
// Assuming that PostUpdateEvent#getOldState() returns database state of the record before modification.
// Otherwise, we would have to execute SQL query to be sure of @Column(updatable = false) column value.
newDbState[i] = event.getOldState()[i];
}
}
return newDbState;
}
event.getOldState() returns NULL and this causes the NullPointer...