diff --git a/orm/db.go b/orm/db.go index 87d08df6..61f747cd 100644 --- a/orm/db.go +++ b/orm/db.go @@ -928,7 +928,7 @@ func (d *dbBase) ReadBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Condi maps[fi.column] = true } } else { - panic(fmt.Errorf("wrong field/column name `%s`", col)) + return -1, fmt.Errorf("wrong field/column name `%s`", col) } } if hasRel {