-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
@ralphschindler Can you update with a milestone, please? |
$sqlStr46 = '( SELECT "foo".* FROM "foo" WHERE a = b ) UNION ALL ( SELECT "bar".* FROM "bar" WHERE c = d ) ORDER BY "a" DESC'; | ||
$internalTests46 = array( | ||
'processCombine' => array('UNION ALL', 'SELECT "bar".* FROM "bar" WHERE c = d') | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralphschindler $select46
<- this test case will conflict with test case on #5643 , if #5643 will going to be merge after it, please let me know and I will update the test case or if any suggestion to make no conflict ( new function or something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not what I would expect the output to be. If you're doing this:
$select46->combine($select46b, Select::COMBINE_UNION, 'ALL')->order(array('a DESC'));
I am expecting that you're applying an order to $select46
, which is the first SELECT. So I'd be expecting, by reading your code, you are attempting to produce this:
( SELECT "foo".* FROM "foo" WHERE a = b ORDER BY "a" DESC ) UNION ALL ( SELECT "bar".* FROM "bar" WHERE c = d )
@ralphschindler I think you're right. I revert the change to Zend\Db\Sql\Select.php and only leave the updated test as your suggestion at #5162 for it. I think the test case is still needed to prove it ;). Thank you. |
Can you rebase develop (with yesterdays changes to Select.php) and point this PR to develop for me? If you can do that soon, I can get this in without having to use a mergetool ;) |
I think this would be test 48 now |
Fixed CS Merge branch 'combineunionorder' of git://github.com/samsonasik/zf2 into hotfix/5855 * 'combineunionorder' of git://github.com/samsonasik/zf2: fix T_OBJECT_OPERATOR on php 5.3 fix array syntax for php 5.3 undo change on Select.php, and leave the test case Fixes #5162 Conflicts: tests/ZendTest/Db/Sql/SelectTest.php
Merged to develop (the merging was actually not hard ;) ) |
Fixes #5162