mirror of
https://github.com/beego/bee.git
synced 2024-12-22 15:10:49 +00:00
allow dot notation in query field
This commit is contained in:
parent
337bd38b73
commit
06f2e2cca9
@ -632,6 +632,8 @@ func GetAll{{modelName}}(query map[string]string, fields []string, sortby []stri
|
||||
qs := o.QueryTable(new({{modelName}}))
|
||||
// query k=v
|
||||
for k, v := range query {
|
||||
// rewrite dot-notation to Object__Attribute
|
||||
k = strings.Replace(k, ".", "__", -1)
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
// order by:
|
||||
|
Loading…
Reference in New Issue
Block a user