-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Update xorm #26049
Update xorm #26049
Conversation
Yes. It's a break change of xorm new version. Previously, count with order by will ignore the For Gitea, when do count, order by should not be appended. |
Should I revert back the change to ignore order by when it's counting? |
No, I think it's fine if we need to write correct queries. But how does it work with |
Yes, I have thought of that. And that's why I think maybe it's need to be reverted to original logic. |
Yes, then the old logic may be better. |
Created a new PR to try to fix it https://gitea.com/xorm/xorm/pulls/2307 |
Seems worse now? |
I found this is a bug of Gitea's test because Gitea use an empty string as |
This could be replaced by #26128 |
Noticed in #25613 that the new xorm version does work with Gitea. Created this PR to keep the other one clean.
The method with the error is
models/unittest.GetCount
changed in #24963. This method generates a query likewhich is invalid for pgsql and mssql:
ERROR: column "user.id" must appear in the GROUP BY clause or be used in an aggregate function
The error message is a bit strange but for
COUNT
the order should be irrelevant.The old xorm version generates the query without
ORDER BY
@lunny fyi