[PR #393] [MERGED] Remove ambiguity in GetUserRepositories SQL #15355

Closed
opened 2025-11-02 11:44:43 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/393
Author: @btrepp
Created: 12/15/2016
Status: Merged
Merged: 1/14/2017
Merged by: @lunny

Base: masterHead: orgsqlfix


📝 Commits (1)

  • 6245732 Removes reliance on server specific SQL

📊 Changes

1 file changed (+16 additions, -2 deletions)

View changed files

📝 models/org.go (+16 -2)

📄 Description

This includes all columns of the repository table in the group by clause
Certain databases will attempt to infer the other columns eg.
https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

As some databases supported by xorm don't have the ability to do this
we include every column in the group by clause, this should work the
same assumining repository.id is unique.

This pull request will fix issues viewing the organisation page with #383.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/393 **Author:** [@btrepp](https://github.com/btrepp) **Created:** 12/15/2016 **Status:** ✅ Merged **Merged:** 1/14/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `orgsqlfix` --- ### 📝 Commits (1) - [`6245732`](https://github.com/go-gitea/gitea/commit/624573247081866d3ec6d369117a8ad037641bf1) Removes reliance on server specific SQL ### 📊 Changes **1 file changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `models/org.go` (+16 -2) </details> ### 📄 Description This includes all columns of the repository table in the group by clause Certain databases will attempt to infer the other columns eg. https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html As some databases supported by xorm don't have the ability to do this we include every column in the group by clause, this should work the same assumining repository.id is unique. This pull request will fix issues viewing the organisation page with #383. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:44:43 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15355