improve fields quoting for gdb.Model
@@ -75,6 +75,9 @@ func (m *Model) doGetAll(limit1 bool, where ...interface{}) (Result, error) {
func (m *Model) getFieldsFiltered() string {
if m.fieldsEx == "" {
// No filtering.
+ if !gstr.Contains(m.fields, ".") && !gstr.Contains(m.fields, " ") {
+ return m.db.QuoteString(m.fields)
+ }
return m.fields
}
var (
