protected function getPrimaryKey()
    {
        if (!isset($this->values[static::$primary_key])) {
            throw new \LogicException('Primary key not set');
        }

        return $this->current_index ?: $this->values[static::$primary_key];
    }
protected function getPrimaryKey()
    {
        if (!isset($this->values[static::$primary_key])) {
            throw new \LogicException('Primary key not set');
        }

        return $this->current_index ?: $this->values[static::$primary_key];
    }
protected function getPrimaryKey ( ) { if ( ! isset ( $ this -> values [ static :: $ primary_key ] ) ) { throw new \ LogicException ( 'Primary key not set' ) ; } return $ this -> current_index ? : $ this -> values [ static :: $ primary_key ] ; }
Get the primary key for this entity as it is stored in the
database. If the key has been updated but not saved, the
original value will be returned.

@return string The primary key of the entity
Get the primary key for this entity as it is stored in the database . If the key has been updated but not saved the original value will be returned .