mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:30:54 +00:00
Return error when wrong filtering field
When end user put wrong filtering field ORM should return error instead of Panic() so developers can handle this error.
This commit is contained in:
parent
053a075344
commit
0e4d954fa7
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user