dialect/sql/sqlgraph: add update node api

Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/222

Reviewed By: alexsn

Differential Revision: D18833733

fbshipit-source-id: e833d84f4e5e5c73b1c85e7387472c9a87b7947e
This commit is contained in:
Ariel Mashraki
2019-12-08 21:58:32 -08:00
committed by Facebook Github Bot
parent bb051603ac
commit 0fb33aaa5e
3 changed files with 525 additions and 77 deletions

View File

@@ -195,6 +195,7 @@ func Sanity(t *testing.T, client *ent.Client) {
usr = client.User.UpdateOne(usr).SetName("baz").AddGroups(grp).SaveX(ctx)
require.Equal("baz", usr.Name)
require.NotEmpty(usr.QueryGroups().AllX(ctx))
// grouping.
var v []struct {
Name string `json:"name"`