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); } }
/** * @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); }