diff --git a/callback_query.go b/callback_query.go index 7facc42b..43c650f7 100644 --- a/callback_query.go +++ b/callback_query.go @@ -60,6 +60,11 @@ func queryCallback(scope *Scope) { if !scope.HasError() { scope.db.RowsAffected = 0 + + if str, ok := scope.Get("gorm:query_hint"); ok { + scope.SQL = addExtraSpaceIfExist(fmt.Sprint(str)) + scope.SQL + } + if str, ok := scope.Get("gorm:query_option"); ok { scope.SQL += addExtraSpaceIfExist(fmt.Sprint(str)) }