This commit is contained in:
Lunny Xiao 2023-12-30 16:43:55 +08:00
parent 4d4311de20
commit df2e20b4ce
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 6 additions and 2 deletions

View File

@ -583,8 +583,12 @@ func (statement *Statement) writeSetColumns(colNames []string, args []any) func(
return err return err
} }
} }
if statement.dialect.URI().DBType == schemas.MSSQL && len(statement.joins) > 0 { if statement.dialect.URI().DBType != schemas.SQLITE && len(statement.joins) > 0 {
if _, err := fmt.Fprint(w, statement.tableName, ".", colName); err != nil { tbName := statement.TableAlias
if tbName == "" {
tbName = statement.TableName()
}
if _, err := fmt.Fprint(w, tbName, ".", colName); err != nil {
return err return err
} }
} else { } else {