From 23abd03a95a16de0ef2d559979ead26b2a3cce66 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 2 Feb 2017 22:29:41 +0800 Subject: [PATCH] Add error if exists after parse query results --- callback_query.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/callback_query.go b/callback_query.go index 93782b1d..e2edd396 100644 --- a/callback_query.go +++ b/callback_query.go @@ -78,6 +78,10 @@ func queryCallback(scope *Scope) { } } + if err := rows.Err(); err != nil { + scope.Err(err) + } + if scope.db.RowsAffected == 0 && !isSlice { scope.Err(ErrRecordNotFound) }