mirror of
https://github.com/beego/bee.git
synced 2024-11-14 06:40:54 +00:00
Update g_model.go
This commit is contained in:
parent
e86aad1be3
commit
cfc1d07061
@ -232,9 +232,9 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
}
|
||||
|
||||
var l []{{modelName}}
|
||||
var list []interface{}
|
||||
qs = qs.OrderBy(sortFields...).RelatedSel()
|
||||
if _, err = qs.Limit(limit, offset).All(&l, fields...); err == nil {
|
||||
var list []interface{}
|
||||
if len(fields) == 0 {
|
||||
for _, v := range l {
|
||||
list = append(list, v)
|
||||
|
Loading…
Reference in New Issue
Block a user