1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 11:50:55 +00:00

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

https://github.com/astaxie/beego/issues/2630
This commit is contained in:
guanly 2017-05-11 21:45:38 +08:00 committed by GitHub
parent 9b01b1c63d
commit 10cd1070f4

View File

@ -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++