From 694cd49df52f6e849dfee30610a4c0ab56b66c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=A0=87?= Date: Mon, 16 Jan 2023 13:24:54 +0800 Subject: [PATCH] fix(statement): The primary key type is not int, but string or uuid (#5984) --- statement.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/statement.go b/statement.go index c7b0b593..ad0ca9b0 100644 --- a/statement.go +++ b/statement.go @@ -287,9 +287,8 @@ func (stmt *Statement) BuildCondition(query interface{}, args ...interface{}) [] return nil } - //The primary key type is not int, but string or uuid (#5984) if len(args) == 0 && (!strings.Contains(s, "?") && !strings.Contains(s, "@")) { - // if it is a string, then treats it as primary key + // The primary key type is not int, but string or uuid (#5984) return []clause.Expression{clause.IN{Column: clause.PrimaryColumn, Values: []interface{}{s}}} }