_getFields() public method

public _getFields ( )
示例#1
0
 private function selectModelColumns(Model $metaInstance, $alias)
 {
     if ($this->_selectModel) {
         $prefix = $this->aliasPrefixForSelect($alias);
         $this->_query->selectColumns = $this->_query->selectColumns + ColumnAliasHandler::createSelectColumnsWithAliases($prefix, $metaInstance->_getFields(), $alias);
     }
 }
示例#2
0
 /**
  * @test
  */
 public function shouldNotIncludeBlankPrimaryKeyInFields()
 {
     //given
     $model = new Model(array('table' => 't_example', 'primaryKey' => '', 'fields' => array('field1')));
     //when
     $fields = $model->_getFields();
     //then
     $this->assertEquals(array('field1'), $fields);
 }