提交 9679f5e2 编写于 作者: M maxin[马鑫]

reduce the data transmission

上级 553078d9
......@@ -192,7 +192,9 @@ func (o *querySet) All(container interface{}, cols ...string) (int64, error) {
// query one row data and map to containers.
// cols means the columns when querying.
func (o *querySet) One(container interface{}, cols ...string) error {
o.limit = 1
if o.limit != 1 {
o.limit = 2
}
num, err := o.orm.alias.DbBaser.ReadBatch(o.orm.db, o, o.mi, o.cond, container, o.orm.alias.TZ, cols)
if err != nil {
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册