Find 用map[int64]*Userinfo 排序无效 #1123

Closed
opened 2018-10-22 16:32:13 +00:00 by wxkj001 · 1 comment
wxkj001 commented 2018-10-22 16:32:13 +00:00 (Migrated from github.com)

goodsCat := make(map[int]*GoodsCatTree, 0)
err := utils.Engine.Table(new(GoodsCategory)).
Where("is_show=1").
OrderBy("sort_order asc").
Find(&goodsCat)
if err != nil {
fmt.Println(err)
}
这样OrderBy 完全无效

> goodsCat := make(map[int]*GoodsCatTree, 0) err := utils.Engine.Table(new(GoodsCategory)). Where("is_show=1"). OrderBy("sort_order asc"). Find(&goodsCat) if err != nil { fmt.Println(err) } 这样OrderBy 完全无效

这个是Go语言的map的问题。

这个是Go语言的map的问题。
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1123
No description provided.