public function patchAction($id, Request $request)
    {
        // Update modified date
        $content = json_decode($request->getContent(), true);
        if ($content) {
            // Checking so update time is correct
            $now = new \DateTime();
            $patch = [
                'op' => 'replace',
                'path' => '/metadata/modificationDate',
                'value' => $now->format(DATE_ISO8601)
            ];
            // It can be a simple patch or a multi array patching.
            if (array_key_exists(0, $content)) {
                $content[] = $patch;
            } else {
                $content = [$content, $patch];
            }

            $request = new Request(
                $request->query->all(),
                $request->request->all(),
                $request->attributes->all(),
                $request->cookies->all(),
                $request->files->all(),
                $request->server->all(),
                json_encode($content)
            );
        }

        return parent::patchAction($id, $request);
    }