public function getPrimaryKey()
    {
        if ($this->_primaryKey === null) {
            $key = (array)$this->getSchema()->primaryKey();
            if (count($key) === 1) {
                $key = $key[0];
            }
            $this->_primaryKey = $key;
        }

        return $this->_primaryKey;
    }
public function getPrimaryKey()
    {
        if ($this->_primaryKey === null) {
            $key = (array)$this->getSchema()->primaryKey();
            if (count($key) === 1) {
                $key = $key[0];
            }
            $this->_primaryKey = $key;
        }

        return $this->_primaryKey;
    }
public function getPrimaryKey ( ) { if ( $ this -> _primaryKey === null ) { $ key = ( array ) $ this -> getSchema ( ) -> primaryKey ( ) ; if ( count ( $ key ) === 1 ) { $ key = $ key [ 0 ] ; } $ this -> _primaryKey = $ key ; } return $ this -> _primaryKey ; }
Returns the primary key field name.

@return string|array
Returns the primary key field name .