Skip to content

Commit 97fbef2

Browse files
author
Psilo
committed
fix update deletes createdOn field
1 parent ac87cb0 commit 97fbef2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<modelVersion>4.0.0</modelVersion>
1616
<artifactId>http-server</artifactId>
17-
<version>0.0.18</version>
17+
<version>0.0.19</version>
1818
<name>HttpServer</name>
1919
<packaging>jar</packaging>
2020

src/main/java/info/unterrainer/commons/httpserver/GenericHandlerGroup.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ private void fullUpdate(final Context ctx) throws IOException {
152152
J json = jsonMapper.fromStringTo(jsonType, ctx.body());
153153
P mappedJpa = orikaMapper.map(json, jpaType);
154154
mappedJpa.setId(jpa.getId());
155+
mappedJpa.setCreatedOn(jpa.getCreatedOn());
156+
mappedJpa.setEditedOn(jpa.getEditedOn());
155157
mappedJpa = extensions.runPreModify(ctx, jpa.getId(), json, jpa, mappedJpa, executorService);
156158
P persistedJpa = dao.update(mappedJpa);
157159

0 commit comments

Comments
 (0)