public function getId(&$entity)
    {
        $structure = $this->getEntityStructure($entity);

        if (isset($entity->{$structure->primaryColumn->propertyName})) {
            return $entity->{$structure->primaryColumn->propertyName};
        }
        return null; // @codeCoverageIgnore
    }