mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
fix(gdb): support multiple order fields in "with"
This commit is contained in:
@ -333,7 +333,12 @@ func (m *Model) parseWithTagInFieldStruct(field gstructs.Field) (output parseWit
|
||||
key = array[0]
|
||||
data[key] = gstr.Trim(array[1])
|
||||
} else {
|
||||
data[key] += " " + gstr.Trim(v)
|
||||
if key == OrmTagForWithOrder {
|
||||
// supporting multiple order fields
|
||||
data[key] += "," + gstr.Trim(v)
|
||||
} else {
|
||||
data[key] += " " + gstr.Trim(v)
|
||||
}
|
||||
}
|
||||
}
|
||||
output.With = data[OrmTagForWith]
|
||||
|
||||
Reference in New Issue
Block a user