Skip to content
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

Unknown column 'id desc' in 'order clause'" #4

Closed
mahuaibo opened this issue Jun 4, 2020 · 4 comments · Fixed by #7
Closed

Unknown column 'id desc' in 'order clause'" #4

mahuaibo opened this issue Jun 4, 2020 · 4 comments · Fixed by #7
Labels
bug Something isn't working

Comments

@mahuaibo
Copy link

mahuaibo commented Jun 4, 2020

gosql.OrderBy("id desc"),

@mlboy
Copy link
Contributor

mlboy commented Jun 9, 2020

这是你表结构中没有 id 字段 所以不能按照id排序

@mlboy mlboy closed this as completed Jun 12, 2020
@mahuaibo
Copy link
Author

mahuaibo commented Jul 1, 2020

我确认是有的这点不用太怀疑哈。我从gorm替换到gosql又都换回去了...

gosql.OrderBy("id") 这个都行,gosql.OrderBy("id desc")这个不行。你说没id字段就说不过去了。

@mlboy mlboy reopened this Jul 1, 2020
@mlboy mlboy added the bug Something isn't working label Jul 1, 2020
@mlboy
Copy link
Contributor

mlboy commented Jul 1, 2020

抱歉,没仔细观察到提示。我将尽快修复它。

@mlboy
Copy link
Contributor

mlboy commented Jul 1, 2020

fixed!

@mlboy mlboy mentioned this issue Jul 1, 2020
@mlboy mlboy closed this as completed in #7 Jul 1, 2020
mlboy added a commit that referenced this issue Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants