public function getAutoIncrementPrimaryKey()
    {
        if ($this->getIdMethod() != IDMethod::NO_ID_METHOD) {
            $pks = $this->getPrimaryKey();
            foreach ($pks as $pk) {
                if ($pk->isAutoIncrement()) {
                    return $pk;
                }
            }
        }

        return null;
    }