Commit aa120022 authored byBrowse files
Fixes ISSUE-45341: OBInterceptor considers an update if audit manually set on new record
New records were considered by OBInterceptor as an update if the createdBy audit column was set manually and it also thrown out a NullPointerException if OBInterceptor.setPreventUpdateInfoChange was set to true previous to the .save. This was happening because OBInterceptor assumed(wrongly) that createdBy field was enough to check if an object was new. This has been modified to check also the other 3 audit fields, if null, it will be considered new and execution will happen onNew method, as expected. Also, onNew method has been modified to update data only if it was not already set previously manually, that means, when those audit creationDate, createdBy, updated and updatedBy are null.