_setupPrimaryKey() protected méthode

If $_primary is not defined, discover primary keys from the information returned by describeTable().
protected _setupPrimaryKey ( ) : void
Résultat void
Exemple #1
0
 protected function _setupPrimaryKey()
 {
     if (empty($this->_primary)) {
         $this->_primary = 'id';
     }
     parent::_setupPrimaryKey();
 }
Exemple #2
0
 protected function _setupPrimaryKey()
 {
     $this->_primary = 'blog_id';
     parent::_setupPrimaryKey();
 }