public function getPrimaryKey()
    {
        if ($this->primary_key === null) {
            $pks = $this->getPrimaryKeys();
            if (count($pks) > 1) {
                throw new Exception\MultiplePrimaryKeysFoundException(__METHOD__ . ": Error getting unique primary key on table, multiple found on table " . $this->prefixed_table);
            }
            $this->primary_key = $pks[0];
        }
        return $this->primary_key;
    }