[+BUGFIX] Fixed column names bug Zend\Db\Sql\Select #3921

Merged
merged 1 commit into from Mar 13, 2013

Conversation

Projects
None yet
2 participants
@tux-rampage
Contributor

tux-rampage commented Feb 28, 2013

Zend\Db\Sql\Select will prepare the column names incorrectly in the rare case when the table is specified with an alias (array('alias' => 'table')) but columns() is called with $prefixColumnsWithTable = false.

Example:

 $select = new Select();
 $select->from(array('x' => 'foo'))->columns(array('bar'), false);

I added a UnitTest case and fixed this bug.

I know this is a rare case but it might happen to someone some day.

[+BUGFIX] Fixed column names bug Zend\Db\Sql\Select
Zend\Db\Sql\Select will prepare the column names incorrectly in the rare
cases when the table is specified with an alias (array('alias' =>
'table')) but columns() is called with $prefixColumnsWithTable = false.

Added a UnitTest case and fixed this bug.

@ghost ghost assigned ralphschindler Mar 8, 2013

ralphschindler added a commit that referenced this pull request Mar 13, 2013

Merge PR #3921
Merge branch 'tux-rampage-hotfix/select-columns-with-table-alias'

@ralphschindler ralphschindler merged commit 0295000 into zendframework:master Mar 13, 2013

1 check passed

default The Travis build passed
Details

ralphschindler added a commit that referenced this pull request Mar 13, 2013

Forward Port #3921
Merge branch 'tux-rampage-hotfix/select-columns-with-table-alias' into develop

@tux-rampage tux-rampage deleted the tux-rampage:hotfix/select-columns-with-table-alias branch Mar 15, 2013

@tux-rampage tux-rampage deleted the tux-rampage:hotfix/select-columns-with-table-alias branch Apr 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment