_setupPrimaryKey() protected method

If $_primary is not defined, discover primary keys from the information returned by describeTable().
protected _setupPrimaryKey ( ) : void
return void
コード例 #1
0
ファイル: Abstract.php プロジェクト: juancarlosjco/yaz
 protected function _setupPrimaryKey()
 {
     if (empty($this->_primary)) {
         $this->_primary = 'id';
     }
     parent::_setupPrimaryKey();
 }
コード例 #2
0
ファイル: Tags.php プロジェクト: veaglefly/BlogCodes
 protected function _setupPrimaryKey()
 {
     $this->_primary = 'blog_id';
     parent::_setupPrimaryKey();
 }