mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-09 02:33:43 +08:00
发布v2.11.5版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -104,7 +104,7 @@ func Sorter(in ISorter) func(m *gdb.Model) *gdb.Model {
|
||||
// 不存在排序条件,默认使用主表主键做降序排序
|
||||
var pk string
|
||||
for name, field := range fields {
|
||||
if gstr.ContainsI(field.Key, consts.GenCodesIndexPK) {
|
||||
if gstr.ContainsI(gstr.ToUpper(field.Key), gstr.ToUpper(consts.GenCodesIndexPK)) {
|
||||
pk = name
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user