-
Notifications
You must be signed in to change notification settings - Fork 821
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
FIX Don't generate table alias for "from" statement that are not column names #11312
FIX Don't generate table alias for "from" statement that are not column names #11312
Conversation
tests/php/ORM/SQLSelectTest.php
Outdated
public function subqueryProvider() | ||
{ | ||
return [ | ||
'no-alias-string' => ['( SELECT DISTINCT "SQLSelectTest_DO"."ClassName" FROM "SQLSelectTest_DO") AS "FINAL"'], |
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 the only scenario that would have failed prior to this PR. The other ones are just there for the sake of completeness.
|
||
public function addFromProvider() | ||
{ | ||
return [ |
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.
Most of those would have pass previously, but addFrom
didn't have explicit test coverage.
8988df3
to
9a8905f
Compare
Got a sink build here with this PR: https://github.com/archiprocode/recipe-kitchen-sink/actions/runs/10103439804 The Lining failure is pre-existing. |
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.
I'd love to have $alias
as a second parameter, so aliases have to be explicitly added instead of the system guessing what it should be.
But that would have to be a major release change so obviously isn't appropriate for this PR.
Seems like a good solution. Just a couple small changes to make.
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.
I'll have implement the requested change tomorrow.
9a8905f
to
f91b279
Compare
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.
LGTM, thanks for doing this.
Manual testing steps
This is updating a low level API that is widely use across tho codebase. There's not really any manual steps that could be taken ... aside from using the system.
Issues
Pull request checklist