From 677d010d86614cfd90d195b81d23497f9b5760fe Mon Sep 17 00:00:00 2001 From: "Yang, Gao" Date: Mon, 1 Jun 2020 23:12:12 +0800 Subject: [PATCH] [Fix-Issue-3991] Add warn for SQLite Read is invoked isForUpdate=true --- orm/db_sqlite.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/orm/db_sqlite.go b/orm/db_sqlite.go index 6b0de591..1d62ee34 100644 --- a/orm/db_sqlite.go +++ b/orm/db_sqlite.go @@ -70,6 +70,9 @@ var _ dbBaser = new(dbBaseSqlite) // override base db read for update behavior as SQlite does not support syntax func (d *dbBaseSqlite) Read(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.Location, cols []string, isForUpdate bool) error { + if isForUpdate { + DebugLog.Println("[WARN] SQLite does not support SELECT FOR UPDATE query, isForUpdate param is ignored and always as false to do the work") + } return d.dbBase.Read(q, mi, ind, tz, cols, false) }