diff --git a/integrations/session_update_test.go b/integrations/session_update_test.go index 2a8f8187..7db3d235 100644 --- a/integrations/session_update_test.go +++ b/integrations/session_update_test.go @@ -1471,8 +1471,12 @@ func TestNilFromDB(t *testing.T) { assert.NotNil(t, tt4.Field1.cb) } -/* func TestUpdateWithJoin(t *testing.T) { + if testEngine.Dialect().URI().DBType == schemas.SQLITE { + t.Skip() + return + } + type TestUpdateWithJoin struct { Id int64 ExtId int64 @@ -1500,4 +1504,3 @@ func TestUpdateWithJoin(t *testing.T) { Update(&TestUpdateWithJoin{Name: "test2"}) assert.NoError(t, err) } -*/ diff --git a/internal/statements/update.go b/internal/statements/update.go index 1eb431a8..008b6d92 100644 --- a/internal/statements/update.go +++ b/internal/statements/update.go @@ -436,10 +436,16 @@ func (statement *Statement) WriteUpdate(updateWriter *builder.BytesWriter, cond return err } + // write table name if err := statement.writeUpdateTableName(updateWriter); err != nil { return err } + // write join + if err := statement.writeJoins(updateWriter); err != nil { + return err + } + // write set if _, err := fmt.Fprint(updateWriter, " SET "); err != nil { return err