@@ -184,6 +184,7 @@ private void fullUpdate(final Context ctx) throws IOException {
184
184
DaoTransaction <E > transaction = dao .getTransactionManager ().beginTransaction (ctx );
185
185
P jpa = hu .getJpaById (ctx , transaction .getManager (), dao );
186
186
try {
187
+ P detachedJpa = orikaMapper .map (jpa , jpaType );
187
188
J json = jsonMapper .fromStringTo (jsonType , ctx .attribute (Attribute .REQUEST_BODY ));
188
189
P mappedJpa = orikaMapper .map (json , jpaType );
189
190
mappedJpa .setId (jpa .getId ());
@@ -192,11 +193,12 @@ private void fullUpdate(final Context ctx) throws IOException {
192
193
193
194
mappedJpa = extensions .runPreModify (ctx , makeAsyncExtensionContextFor (ctx ), transaction .getManager (),
194
195
jpa .getId (), json , jpa , mappedJpa , executorService );
196
+
195
197
P persistedJpa = dao .update (transaction .getManager (), mappedJpa , hu .getReadTenantIdsFrom (ctx ));
196
198
197
199
J r = orikaMapper .map (persistedJpa , jsonType );
198
200
r = extensions .runPostModify (ctx , makeAsyncExtensionContextFor (ctx ), transaction .getManager (), jpa .getId (),
199
- json , jpa , mappedJpa , persistedJpa , r , executorService );
201
+ json , detachedJpa , mappedJpa , persistedJpa , r , executorService );
200
202
201
203
ctx .attribute (Attribute .RESPONSE_OBJECT , r );
202
204
0 commit comments