@Override public void update(U u) throws EntityNotFoundException, RelationNotFoundException { inTx(tx -> { Util.update(context.entityClass, tx, context.select().get(), u, this::preUpdate, this::postUpdate); return null; }); if (useCachedEntity && context.getCreatedEntity() != null) { context.setCreatedEntity((E) context.getCreatedEntity().update().with(u)); } }