protected function key($data = null)
    {
        if (is_null($data)) {
            $data = $this->getPK();
            //
            if (Table::count($data) > 1) {
                throw new ManyPrimaryKeysException();
            } elseif (Table::count($data) == 0) {
                throw new PrimaryKeyNotFoundException(static::$table);
            }
            //
            $this->_keyName = $data[0]['Column_name'];
            $this->_key['name'] = $data[0]['Column_name'];
        } else {
            $this->_keyName = $data['key'];
            $this->_key['name'] = $data['key'];
        }
    }
protected function key($data = null)
    {
        if (is_null($data)) {
            $data = $this->getPK();
            //
            if (Table::count($data) > 1) {
                throw new ManyPrimaryKeysException();
            } elseif (Table::count($data) == 0) {
                throw new PrimaryKeyNotFoundException(static::$table);
            }
            //
            $this->_keyName = $data[0]['Column_name'];
            $this->_key['name'] = $data[0]['Column_name'];
        } else {
            $this->_keyName = $data['key'];
            $this->_key['name'] = $data['key'];
        }
    }
protected function key ( $ data = null ) { if ( is_null ( $ data ) ) { $ data = $ this -> getPK ( ) ; // if ( Table :: count ( $ data ) > 1 ) { throw new ManyPrimaryKeysException ( ) ; } elseif ( Table :: count ( $ data ) == 0 ) { throw new PrimaryKeyNotFoundException ( static :: $ table ) ; } // $ this -> _keyName = $ data [ 0 ] [ 'Column_name' ] ; $ this -> _key [ 'name' ] = $ data [ 0 ] [ 'Column_name' ] ; } else { $ this -> _keyName = $ data [ 'key' ] ; $ this -> _key [ 'name' ] = $ data [ 'key' ] ; } }
set primary key
the framework doesn't support more the column to be
the primary key otherwise exception will be thrown.

@return null
set primary key the framework doesn t support more the column to be the primary key otherwise exception will be thrown .