Commit 10cd1070 authored by guanly's avatar guanly Committed by GitHub

使用sqlite,orm中通过filter后的delete删除不成功

https://github.com/astaxie/beego/issues/2630
parent 9b01b1c6
......@@ -835,7 +835,7 @@ func (d *dbBase) DeleteBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Con
}
pkValue, err := d.convertValueFromDB(mi.fields.pk, reflect.ValueOf(ref).Interface(), tz)
if err != nil {
panic(fmt.Errorf("get pk value failed: `%s` ", ref))
return 0, err
}
args = append(args, pkValue)
cnt++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment