From aa142ce8c928a171f4cad65985035a6363604e13 Mon Sep 17 00:00:00 2001 From: xiaozirun <807046079@qq.com> Date: Tue, 5 Nov 2024 20:16:57 +0800 Subject: [PATCH] fix: table not change (#6913) --- statement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/statement.go b/statement.go index 39e05d093..486006124 100644 --- a/statement.go +++ b/statement.go @@ -490,7 +490,7 @@ func (stmt *Statement) Parse(value interface{}) (err error) { } func (stmt *Statement) ParseWithSpecialTableName(value interface{}, specialTableName string) (err error) { - if stmt.Schema, err = schema.ParseWithSpecialTableName(value, stmt.DB.cacheStore, stmt.DB.NamingStrategy, specialTableName); err == nil && stmt.Table == "" { + if stmt.Schema, err = schema.ParseWithSpecialTableName(value, stmt.DB.cacheStore, stmt.DB.NamingStrategy, specialTableName); err == nil { if tables := strings.Split(stmt.Schema.Table, "."); len(tables) == 2 { stmt.TableExpr = &clause.Expr{SQL: stmt.Quote(stmt.Schema.Table)} stmt.Table = tables[1]