Skip to content

Commit

Permalink
create new Entity regardless of result
Browse files Browse the repository at this point in the history
  • Loading branch information
georghas authored and hylkevds committed Sep 25, 2024
1 parent 048e019 commit 587ee06
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,14 +471,13 @@ public EntityChangedMessage updateInDatabase(JooqPersistenceManager pm, Entity e
hookWrapper.getObject().postUpdateInDatabase(pm, entity, entityId, updateMode);
}

if (result == null) {
return message;
}
Entity newEntity = new DefaultEntity(entityType, entity.getPrimaryKeyValues());
message.setEntity(newEntity);

for (PropertyFields<T> sp : propertyFields) {
sp.converter.convert(thisTable, result, newEntity, dataSize);
if (result != null) {
for (PropertyFields<T> sp : propertyFields) {
sp.converter.convert(thisTable, result, newEntity, dataSize);
}
}

return message;
Expand Down

0 comments on commit 587ee06

Please sign in to comment.