protected function extractPrimaryKeyFields(EventInterface $event, $strategy = 'automatic')
    {
        $primaryKeyFields = [];

        switch ($strategy) {
            case 'automatic':
                $id = (array)$event->getId();
                if (count($id) === 1) {
                    $id = array_pop($id);
                } else {
                    $id = $this->serialize($id);
                }
                $primaryKeyFields['primary_key'] = $id;
                break;

            case 'properties':
                $id = (array)$event->getId();
                if (count($id) === 1) {
                    $primaryKeyFields['primary_key'] = array_pop($id);
                } else {
                    foreach ($id as $key => $value) {
                        $primaryKeyFields['primary_key_' . $key] = $value;
                    }
                }
                break;

            case 'raw':
                $primaryKeyFields['primary_key'] = $event->getId();
                break;

            case 'serialized':
                $id = $event->getId();
                $primaryKeyFields['primary_key'] = $this->serialize($id);
                break;
        }

        return $primaryKeyFields;
    }