public function onPostSerialize(ObjectEvent $event)
    {
        $object = $event->getObject();

        // FIXME This can be removed, as soon as we've got rid of all ApiEntities.
        if ($object instanceof ApiWrapper) {
            $object = $object->getEntity();
        }

        if (!$object instanceof AuditableInterface && !$object instanceof LocalizedAuditableBehavior) {
            return;
        }

        $visitor = $event->getVisitor();

        if (!$visitor instanceof GenericSerializationVisitor) {
            return;
        }

        $visitor->setData('_hash', $this->hasher->hash($object));
    }