Fix Count: honor custom SELECT count expressions, avoid extra columns#7627
Fix Count: honor custom SELECT count expressions, avoid extra columns#7627StounhandJ wants to merge 2 commits intogo-gorm:masterfrom
Conversation
|
Fix: prevent duplicate select columns when The PR adjusts the Key Changes• Added prefix check for Affected Areas• This summary was automatically generated by @propel-code-bot |
|
Hi @StounhandJ Can you add some tests? |
|
Hi @jinzhu I missed the message, but here are two Count tests along with the Join |
|
Hi @jinzhu This change is necessary to remove the existing workarounds. Without it, we are forced to keep temporary patches in place, which is not sustainable in the long term. |
What did this pull request do?
When creating a Count request, if a Select was passed with count, substitute it in Clause to avoid unexpected addition of the request.
User Case Description
InnerJoins is used here as adding an internal verification condition.
Extra fields appear in the final sql, which violates the correctness of the work.
The result after correction