New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rework of pull request #354 on issue #124 #525
Conversation
Fixes issue yiisoft#124 CDbCommandBuilder produced faulty mysql update queries when joins are involved. JOIN has to come before SET in mysql.
testing mysql update commands with new CMysqlCommandBuilder issue yiisoft#124
That's quite some duplicated code. Could you please check if other DBMS supports similar syntax? If so, we should modify CDbCommandBuilder.php directly. Even if it is not, we should still try to refactor the code to avoid copy large chunk of code. |
Okay, will check it. |
w/o link: mssql seems to be content with what the unaltered command builder provides. |
bump |
nope, sorry have not much time at the moment. |
That's okay. But this has been left withoug a notice on Google Code for almost half a year before, so I just want to make sure it's not forgotten. |
* 'master' of https://github.com/yiisoft/yii: (651 commits) Updated guide Gii Model Generator page screenshot. adjusted CHANGELOG Requirements checking slightly improved. Enhanced CHANGELOG description Requirements checker: added support of the Oracle database (pdo_oci extension) MSSQL driver types refinements. Requirements checker: added support of the MSSQL (pdo_dblib and pdo_sqlsrv extensions). Language fixes. Preparations for merging fixes of the yiisoft#556 into 1.1.13 codebase. [docs][blog] 'yiic' to 'Gii' ajaxUpdate is never false in jquery.yiilistview.js Added /docs/guide/fr/caching.overview.twt Added /docs/guide/fr/basics.controller.txt Added /docs/guide/fr/basics.mvc.txt Update framework/web/filters/CHttpCacheFilter.php Update docs/guide/fr/toc.txt [NL] Dutch messages translation updated added history.js license prepare for next release. prepare for 1.1.12 release. ... Conflicts: CHANGELOG
changed position of JOIN in UPDATE by overwriting applyJoin()
Found a better solution by overwriting |
Nice. No idea why this didn't occur to me in the first place. |
cleanup of @DaSourcerer's pull request #354 on issue #124
the new CMysqlCommandBuilder overides the complete method but the only difference to the original implementation is
line 61-63 and 100-103 each:
and lines 68 + 106:
Tested this with my application and a unit test is also attached so I think it is ready for merge now.