From a3d9bbfc36e40e1aa9b633f6a5c2fb2ad82d4dd6 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 19 Mar 2021 13:21:43 +0800 Subject: [PATCH] build *clause.Expr --- statement.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/statement.go b/statement.go index 3d64d443..7a827ca8 100644 --- a/statement.go +++ b/statement.go @@ -167,6 +167,8 @@ func (stmt *Statement) AddVar(writer clause.Writer, vars ...interface{}) { stmt.AddVar(writer, v.GormValue(stmt.Context, stmt.DB)) case clause.Expr: v.Build(stmt) + case *clause.Expr: + v.Build(stmt) case driver.Valuer: stmt.Vars = append(stmt.Vars, v) stmt.DB.Dialector.BindVarTo(writer, stmt, v)