allow dot notation in query field

This commit is contained in:
ZhengYang 2014-08-05 15:27:05 +08:00
parent 337bd38b73
commit 06f2e2cca9
1 changed files with 2 additions and 0 deletions

View File

@ -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: