_setupPrimaryKey() защищенный Метод

If $_primary is not defined, discover primary keys from the information returned by describeTable().
protected _setupPrimaryKey ( ) : void
Результат void
Пример #1
0
 protected function _setupPrimaryKey()
 {
     if (empty($this->_primary)) {
         $this->_primary = 'id';
     }
     parent::_setupPrimaryKey();
 }
Пример #2
0
 protected function _setupPrimaryKey()
 {
     $this->_primary = 'blog_id';
     parent::_setupPrimaryKey();
 }