1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 10:01:28 +00:00

Merge pull request #3333 from akhedrane/patch-1

Return error when wrong filtering field
This commit is contained in:
astaxie 2018-09-30 15:45:23 +08:00 committed by GitHub
commit 8134a89e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -928,7 +928,7 @@ func (d *dbBase) ReadBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Condi
maps[fi.column] = true maps[fi.column] = true
} }
} else { } else {
panic(fmt.Errorf("wrong field/column name `%s`", col)) return -1, fmt.Errorf("wrong field/column name `%s`", col)
} }
} }
if hasRel { if hasRel {