From aa89736db2fd175391d23ef02406414125d21067 Mon Sep 17 00:00:00 2001 From: Cr <631807682@qq.com> Date: Sat, 18 Feb 2023 09:13:36 +0800 Subject: [PATCH] fix: miss join type (#6056) --- chainable_api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chainable_api.go b/chainable_api.go index 676fe914..a85235e0 100644 --- a/chainable_api.go +++ b/chainable_api.go @@ -253,7 +253,10 @@ func joins(db *DB, joinType clause.JoinType, query string, args ...interface{}) if len(args) == 1 { if db, ok := args[0].(*DB); ok { - j := join{Name: query, Conds: args, Selects: db.Statement.Selects, Omits: db.Statement.Omits} + j := join{ + Name: query, Conds: args, Selects: db.Statement.Selects, + Omits: db.Statement.Omits, JoinType: joinType, + } if where, ok := db.Statement.Clauses["WHERE"].Expression.(clause.Where); ok { j.On = &where }