From 332cfe5c6e95d777e79ec663278f564cc884b667 Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:15:38 +0200 Subject: [PATCH] entc/gen: use named fields on client creations (#359) --- entc/gen/internal/bindata.go | 4 ++-- entc/gen/template/ent.tmpl | 4 ++-- entc/integration/config/ent/user.go | 2 +- entc/integration/customid/ent/blob.go | 2 +- entc/integration/customid/ent/group.go | 4 ++-- entc/integration/customid/ent/pet.go | 4 ++-- entc/integration/customid/ent/user.go | 10 +++++----- entc/integration/ent/card.go | 6 +++--- entc/integration/ent/comment.go | 2 +- entc/integration/ent/fieldtype.go | 2 +- entc/integration/ent/file.go | 6 +++--- entc/integration/ent/filetype.go | 4 ++-- entc/integration/ent/group.go | 10 +++++----- entc/integration/ent/groupinfo.go | 4 ++-- entc/integration/ent/item.go | 2 +- entc/integration/ent/node.go | 6 +++--- entc/integration/ent/pet.go | 6 +++--- entc/integration/ent/spec.go | 4 ++-- entc/integration/ent/user.go | 24 +++++++++++------------ entc/integration/gremlin/ent/card.go | 6 +++--- entc/integration/gremlin/ent/comment.go | 2 +- entc/integration/gremlin/ent/fieldtype.go | 2 +- entc/integration/gremlin/ent/file.go | 6 +++--- entc/integration/gremlin/ent/filetype.go | 4 ++-- entc/integration/gremlin/ent/group.go | 10 +++++----- entc/integration/gremlin/ent/groupinfo.go | 4 ++-- entc/integration/gremlin/ent/item.go | 2 +- entc/integration/gremlin/ent/node.go | 6 +++--- entc/integration/gremlin/ent/pet.go | 6 +++--- entc/integration/gremlin/ent/spec.go | 4 ++-- entc/integration/gremlin/ent/user.go | 24 +++++++++++------------ entc/integration/idtype/ent/user.go | 8 ++++---- entc/integration/json/ent/user.go | 2 +- entc/integration/migrate/entv1/car.go | 4 ++-- entc/integration/migrate/entv1/user.go | 10 +++++----- entc/integration/migrate/entv2/car.go | 4 ++-- entc/integration/migrate/entv2/group.go | 2 +- entc/integration/migrate/entv2/pet.go | 2 +- entc/integration/migrate/entv2/user.go | 6 +++--- entc/integration/template/ent/group.go | 2 +- entc/integration/template/ent/pet.go | 4 ++-- entc/integration/template/ent/user.go | 6 +++--- examples/edgeindex/ent/city.go | 4 ++-- examples/edgeindex/ent/street.go | 4 ++-- examples/entcpkg/ent/user.go | 2 +- examples/m2m2types/ent/group.go | 4 ++-- examples/m2m2types/ent/user.go | 4 ++-- examples/m2mbidi/ent/user.go | 4 ++-- examples/m2mrecur/ent/user.go | 6 +++--- examples/o2m2types/ent/pet.go | 4 ++-- examples/o2m2types/ent/user.go | 4 ++-- examples/o2mrecur/ent/node.go | 6 +++--- examples/o2o2types/ent/card.go | 4 ++-- examples/o2o2types/ent/user.go | 4 ++-- examples/o2obidi/ent/user.go | 4 ++-- examples/o2orecur/ent/node.go | 6 +++--- examples/start/ent/car.go | 4 ++-- examples/start/ent/group.go | 4 ++-- examples/start/ent/user.go | 6 +++--- examples/traversal/ent/group.go | 6 +++--- examples/traversal/ent/pet.go | 6 +++--- examples/traversal/ent/user.go | 10 +++++----- 62 files changed, 164 insertions(+), 164 deletions(-) diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index fead94a85..2297fc6cd 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -820,7 +820,7 @@ func templateDialectSqlUpdateTmpl() (*asset, error) { return a, nil } -var _templateEntTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x58\x5d\x6f\xe3\xb8\xd5\xbe\xb6\x7e\xc5\x59\xc1\xb3\x6b\x1b\x8e\x34\xef\xde\xbd\xd3\xa6\x40\x76\x92\x01\x02\x0c\xb2\x6d\x93\x41\x2f\x06\x83\x09\x2d\x1e\xd9\x6c\x64\xd2\x43\x52\x4e\x02\x41\xff\xbd\x38\xa4\x28\x53\xb6\x92\x4d\xb7\x57\x96\xc9\xf3\xf9\x1c\xf2\x7c\xb0\x69\xf2\x45\xf2\x51\xed\x9e\xb5\x58\x6f\x2c\xfc\xfa\xfe\xff\xfe\xff\x6c\xa7\xd1\xa0\xb4\xf0\x89\x15\xb8\x52\xea\x01\xae\x65\x91\xc1\x45\x55\x81\x23\x32\x40\xfb\x7a\x8f\x3c\x4b\xee\x36\xc2\x80\x51\xb5\x2e\x10\x0a\xc5\x11\x84\x81\x4a\x14\x28\x0d\x72\xa8\x25\x47\x0d\x76\x83\x70\xb1\x63\xc5\x06\xe1\xd7\xec\x7d\xd8\x85\x52\xd5\x92\x27\x42\xba\xfd\xcf\xd7\x1f\xaf\x6e\x6e\xaf\xa0\x14\x15\x42\xb7\xa6\x95\xb2\xc0\x85\xc6\xc2\x2a\xfd\x0c\xaa\x04\x1b\x29\xb3\x1a\x31\x4b\x16\x79\xdb\x26\x49\xd3\x00\xc7\x52\x48\x84\x74\xab\x38\x56\x29\x74\xab\xd3\xdd\xc3\x1a\x3e\x9c\xc3\x8a\x19\x84\x69\xf6\x51\xc9\x52\xac\xb3\xbf\xb3\xe2\x81\xad\x91\x88\x9a\x06\x2c\x6e\x77\x15\xb3\x08\xe9\x06\x19\x47\x9d\xc2\x34\xb0\x1f\xb6\xc4\x76\xa7\xb4\x0d\x5b\x79\x0e\x24\x3c\xbb\x61\x5b\x92\x42\x3e\x93\xc1\x4e\x37\xa0\xb4\xc2\x3e\x43\xa9\xbc\xe7\x03\x42\x53\x6c\x70\xcb\xb2\xc4\x3e\xef\x8e\x77\xac\xae\x0b\x0b\x4d\x32\x29\x9c\x91\x30\x50\xef\x24\xe7\x6a\x2b\xac\x65\x6b\xd3\x99\x31\xc9\x73\xb8\xbe\xf4\xb8\x20\xa9\xcd\x92\xc9\xf5\xa5\x17\x7b\x7d\x99\xdd\x91\x8e\xb6\x85\xfb\xb0\x70\xeb\x54\xdc\xb1\x35\xb4\xed\x7d\x32\x69\x9a\x33\xd0\x4c\xae\x11\xa6\xdf\x97\x30\x2d\x09\xa7\x69\xf6\x49\x60\xc5\x8d\x13\x3f\xe9\xdc\x2c\x3b\x4e\xb7\x45\x12\x37\x8a\x48\x48\xe9\x9e\x55\x35\x06\x0b\x52\x4f\xdc\x79\x94\x42\x49\xf4\x59\x02\x00\x30\x19\x95\xd3\x34\x20\x4a\xc7\x22\xaa\x8a\xad\x2a\x62\x5b\x34\x0d\xa0\xa4\x6d\xcf\x12\xbc\xf0\xb4\x52\x59\x27\x07\xa5\x11\x56\xec\x69\xe7\x3e\x16\xdd\x39\x47\x32\x2a\x83\x5e\xc8\xeb\x28\xf6\xea\x3c\x20\xf1\xf7\xa3\xb0\x1b\x98\x66\x57\x7c\x8d\x07\x40\xfc\xbf\x03\x02\x1a\x2b\x66\x85\x92\x26\x47\xb7\x43\x61\x57\x76\x83\x1a\xa4\xe2\x68\xc2\x59\x5e\x6b\xb6\xdb\x64\x5e\xc4\x5d\x00\xce\x00\xd3\x08\x2b\x14\x72\x0d\x3b\xb5\xab\xc9\x4a\x0e\xab\xe7\x93\x73\xf3\x8f\x1a\xf5\x33\x3c\x6e\x50\x02\xb2\x35\xea\xb3\x4a\x31\x4e\x5c\x74\x1d\x90\xe2\x3e\xf1\x76\xc5\x4c\x7e\xe5\xfe\xdf\x46\xc9\x0f\xa9\x33\x2e\xbd\x3f\x38\x79\x16\xbc\xcc\x17\x70\xc1\xb9\x20\x1f\x58\xe5\x63\x66\xc0\x2a\x60\xbc\x37\xc5\x58\xa5\xe9\xbe\x70\x2d\xf6\xa8\x33\x70\x97\xce\x31\x4f\xed\x76\x57\xd1\xc1\xd9\x69\x21\x6d\x09\x29\x17\xac\xc2\xc2\xe6\xef\x4c\xee\xd1\xf6\x02\x53\x98\x66\xb7\x9d\x94\xc0\x2b\x4a\xd8\x30\x73\x17\xa2\xe3\x45\x39\x98\x69\xf7\xc9\x0e\x37\xb2\xd1\x10\xbd\xc1\xf8\xda\xc4\x26\x9f\x9c\x06\xcf\x93\xb3\x5e\x4a\x77\xb9\x5c\x02\x38\x3d\x03\x47\x37\xff\x7f\x3b\x0d\x27\x59\xc0\x8b\x3b\xa4\x82\xe8\x8a\x22\xa1\x9c\x0d\xee\x25\xbe\xf1\x5e\x7a\xda\x90\x68\xc8\xb0\xcc\x81\x3c\x22\x21\xba\x65\x98\x7d\x91\xe2\x47\x4d\x3c\x5f\xbf\xf5\xb7\x64\xe1\xd9\xe8\x56\xf6\x12\x9b\xa6\x83\x09\x4f\x6e\x61\x16\x6e\xe3\xc8\x15\xcb\x73\xa0\x63\x8c\x9c\x84\xc5\x20\x0a\x59\x2a\xbd\x75\x38\x3a\x00\x35\x52\xee\x75\xc7\xbd\x04\xe6\x18\x1d\x72\x8f\xcc\x74\x12\x60\xe6\xc8\x7e\xd4\x68\x2c\xf2\x39\xc1\x3c\xbc\x27\x8a\x02\x40\xf7\x24\xd6\xf8\xb5\x69\xa0\x42\xe9\x8c\xfc\xb6\x52\xaa\x0a\x41\xef\x20\x17\xcb\x01\xec\x2f\xa0\xfe\xbb\xbe\xd2\xa4\xdc\xd6\x5a\x9a\x08\xef\x23\x64\xbb\x88\x68\x60\x12\x50\x6b\xa5\xc9\x19\x97\xb7\xf9\x1a\x9d\x70\x72\x87\x90\xef\x5c\x3a\xf6\xa1\x4b\x96\x51\x58\x96\x24\xae\xa3\x5e\xd5\xb6\x17\xe0\x0a\x6b\x0f\x7a\x96\x4c\xca\x5a\x16\x30\x1b\x39\x6a\xf3\x97\x3d\x9a\xcd\x61\xf6\x67\x4e\xc3\xd2\x7b\x37\xa7\xe3\x3b\x11\x25\x60\x16\x41\x4e\x88\x4f\x05\xc1\xed\xb6\x43\x1a\x88\xa5\xd3\xb2\xe7\x1b\x85\xf1\xfc\x1c\xa4\xa8\x3c\x77\x9f\x4c\x09\xc2\xa3\x53\x1e\x9d\x8d\x63\x20\x97\x3d\xef\x09\x68\x99\xdf\xf2\xc1\x24\x45\x4b\xf8\xf9\x46\xd9\x4f\xb4\x77\x45\x6e\x35\x15\x5b\x61\xf5\x01\x22\xbf\x0f\xcd\x44\xf6\x99\x36\xbd\x07\x6d\x70\x2f\x9c\xf6\x5e\xea\xb8\x63\x4b\xd2\x96\x78\xbe\x63\xf5\x9f\x9d\x1f\x5e\x3f\xb9\xfa\xc1\x57\xda\xde\xd9\xb4\x4d\x26\x6d\x12\x29\x8b\x3e\x5d\x13\xe4\x12\xe8\x68\x8e\xe6\x48\x3d\x5b\xae\x24\x1e\x65\xe8\xa6\x39\xc9\xc0\x7d\x57\x34\xd5\x58\x20\x55\x02\xdf\x31\xfc\x33\xfc\xeb\xb6\xa3\x9e\x02\x3d\xc5\xa1\x82\xba\x5a\x4d\xa7\x31\x94\x0c\x48\x5d\x6d\x4b\x4f\x11\xe9\x2f\x9c\xa3\x6f\x5b\xf8\x51\xa3\x16\x68\x5e\x48\x69\x71\xb2\x0b\x1b\xfd\xd1\x1f\x18\xdd\xb6\xb0\x88\xa9\xe6\xb1\x96\xd9\x1c\x8e\x0f\x75\x28\xbf\xcd\x21\x34\xb3\x9f\x63\x01\x1f\x2b\x81\xd2\x36\x70\xa4\x25\xf3\x8d\x5c\x3b\xcf\x62\xf9\x47\x44\x73\x1f\xba\x3e\x5c\x79\x0e\x5f\x76\x9c\x40\x0f\x19\x85\xc1\xaa\x16\x15\xf5\xd1\x94\x0b\x6b\xda\xa4\x8c\xe6\x5a\xe1\xa1\xb3\x79\x0e\x37\xca\x22\xd8\x0d\xb3\x4b\x78\x56\x35\x48\x44\x4e\xe5\xb0\x60\x55\x35\x24\xfe\x22\x1f\x35\xdb\xcd\xe6\xb0\xc2\x52\x69\x74\x14\xbd\xd8\x2d\xda\x8d\xe2\x4b\x9f\xa1\x8e\xd4\x24\x5d\xa6\xf2\xe6\x21\x87\x52\xab\x2d\x30\xb0\x9a\x49\xc3\x0a\x4a\xda\x4b\x60\x92\xbb\x60\x44\x8b\x8e\xa9\x50\x5b\x6a\xbe\x90\x53\xe6\xd2\xaa\xaa\x28\x73\xb1\xe2\x21\x4b\xde\x14\x27\x8f\x4c\x08\x51\x58\xf7\xab\xbf\x4b\xa4\x08\xfd\xb9\x00\xf5\x22\x4e\xc3\xd3\xc5\xc4\xc1\x05\xb5\xfb\x31\xa1\xdf\xa6\x36\x9f\xc0\xfe\x23\x40\x80\x95\x16\x35\x08\x4f\x58\x54\xca\x20\x5f\x92\x58\xa3\x3c\x3f\x85\x47\xe2\x93\xed\xcf\xf8\xa3\xa8\x2a\x58\x21\xe0\x13\x16\x35\xe1\x65\x37\x5a\xd5\xeb\x8d\xd3\xec\xdb\x30\x78\xdc\x88\x62\x03\x85\x46\xe6\x09\x06\x70\xbf\x15\xd1\x70\x0c\x06\xeb\x04\xa4\x7d\x5a\x82\x7a\xa0\x7b\x3a\x8e\x5a\xd6\x35\x83\xb3\x85\x7d\xba\x74\x9f\xf3\x84\xf2\xf6\x4f\xea\xc1\xdd\x94\x1d\x93\xa2\x98\xa5\x61\x06\x6b\xdb\x0f\x27\x23\x13\xa5\xdd\x01\x4e\x2c\x0c\x4f\xa9\xbb\x16\x93\x57\x35\xc3\x39\xd8\xa7\x8c\xeb\x7d\x1f\xf4\x23\xf2\x2e\x74\xb7\x56\xbb\xd6\x61\xbb\xab\x70\x8b\xd2\xfa\xe8\x95\x5b\x9b\xf9\x1d\xd4\x6f\xc4\xca\x93\xcf\xe6\xd4\x9f\x91\xc4\x26\x99\xec\x99\xee\x6f\xa7\x5f\x35\xd9\x6f\xfe\x7f\x32\xe9\x36\xb2\x7f\x69\x61\xb1\x63\x4e\x63\x91\x33\x72\x73\x8c\xca\x19\xe7\xb3\xf5\x2c\x15\xfc\xfc\xdd\x3e\x5d\x9e\x84\xe1\xfa\x72\x3e\x1f\x74\x88\x62\x7c\x88\x0b\x35\x76\x38\x35\x51\x41\x1a\x35\x70\x09\x83\x29\xee\xfc\xaf\x26\x70\xfd\x8d\xcc\xf5\x35\xcd\xcf\x56\xa1\xc4\x4d\x4d\x19\x8f\x00\xef\x4c\xf6\x8e\x1a\xfe\xde\xd8\x93\xc1\x2f\x2e\xfd\x83\xe1\x2f\x14\xff\x7d\x38\x77\xa6\x84\xb6\xfd\x0b\xec\xe1\xa7\x41\xdd\x7f\x93\xe5\xce\xdc\x81\xa6\x6b\x73\x27\xb6\xbd\x9e\x71\x31\xfb\xec\x93\x6b\x3e\x67\x56\x6c\x31\xbb\xb8\xb9\xbd\xfe\x38\x8f\x04\x39\xd7\x83\xb4\xee\x68\xbd\x2a\x6f\xb1\x3f\xe6\x7e\x95\x7c\x10\x7a\x17\xf7\xc5\x7e\xa0\xbf\x6f\x27\xa2\x16\x23\x92\xfa\xdf\x20\xf3\x22\x30\x63\x42\xfa\x68\xbc\x88\xcf\x1f\xc1\xf3\xaa\xd4\x23\x11\xaf\xf1\x9c\x42\x74\x90\x12\x89\x91\xf1\x49\xeb\xff\x1d\x0f\x90\xe1\x7b\xa0\xe8\xb7\x67\x8b\xb3\x5f\xe6\xbf\xcc\xfb\xd4\x12\xb6\x43\x0e\x08\x93\x02\x0d\x24\x92\xfb\xe7\x95\xde\xe1\x99\xeb\x98\x69\xe9\x8b\x41\x7d\xe9\x1e\xa6\xf8\xbc\xab\x9d\x82\x0f\x66\x05\x6a\x81\x34\x76\xef\x6d\x7e\xe4\xe9\x1a\x99\xeb\xcb\xf0\x80\xf2\xa6\xec\x24\xf8\x6c\xee\xa4\x35\xc9\x44\xf0\x25\x7c\xa7\x2b\x64\xac\x2e\x94\xdc\x67\x17\x56\x89\x63\x01\x94\x40\x7a\xff\x04\x4f\x4e\xdb\x46\x53\x89\xc2\x75\x70\xbb\xaa\xd6\xac\x1a\xf6\x00\x07\x02\x9f\xcc\x19\xec\x98\x36\xee\x1e\xfb\x65\x55\x1e\xb5\x27\xfd\xb4\xdb\xb3\x7d\xfd\x36\x70\xc2\x69\x75\x93\x24\x3e\x59\x32\x64\x0a\xe9\x2d\xd1\xa6\x07\x1e\x5f\x14\x5e\x79\x75\xe8\x3a\xda\x2d\x93\xcf\xa7\x8f\x0e\xe3\xaf\x0a\x51\xfb\x35\x0e\x75\x6c\xf4\x1c\x7c\x15\x9a\x15\xe5\xba\xfb\x74\xb3\x0e\x35\x67\xdf\x05\x19\xe5\xd3\xf1\x89\x8c\x6e\xe4\x8e\xd6\xbe\x7e\x17\xdf\xba\x9a\x06\xe7\x50\x94\x6b\x2a\x7a\x03\x73\x9a\x26\x5f\xc0\xc5\xe1\xcd\xc2\x3d\x27\x50\x07\x45\xc7\xcc\x3f\x13\x9c\x59\xb6\x36\xdd\xfb\xc6\xf1\x33\x68\xf4\xd4\xe5\x1e\xba\xba\xc7\x8c\x3b\xb6\xf6\x03\xb0\x9f\xcd\xa3\xf2\x61\xc3\xb4\xdb\x4d\x7e\xb4\x0c\xef\x3b\x08\x0e\xaf\x72\x96\xca\x79\x7a\x96\xf6\x8b\xf7\xf1\xf6\x4b\xc6\xbb\x4e\xa7\x60\x92\xfa\x1a\xb5\x47\xad\x45\x37\x9d\x29\xed\x5e\x89\xfd\xab\x0d\x1b\x7b\xce\x71\xfd\x16\x2b\x36\x6e\xee\xcf\xc6\x7d\x1d\x79\xc8\x21\x73\x50\xf2\xb6\x4d\xfe\x13\x00\x00\xff\xff\xa8\xb8\xde\x24\xe5\x16\x00\x00") +var _templateEntTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x58\xdf\x6f\xe3\xb8\xf1\x7f\xb6\xfe\x8a\x39\xc1\x7b\x67\x1b\x8e\xb4\xdf\x7b\xfb\x6e\x9b\x02\xb9\x4d\x16\x08\xb0\xc8\xb5\x4d\x16\x7d\x58\x2c\x36\xb4\x38\xb2\xd9\xc8\xa4\x97\xa4\x9c\x04\x82\xfe\xf7\x62\x48\x51\xa6\x6c\x25\x97\xf6\x9e\x2c\x93\xf3\xf3\x33\xc3\xe1\x0c\x9b\x26\x5f\x24\x1f\xd5\xee\x59\x8b\xf5\xc6\xc2\xaf\xef\xff\xef\xff\xcf\x76\x1a\x0d\x4a\x0b\x9f\x58\x81\x2b\xa5\x1e\xe0\x5a\x16\x19\x5c\x54\x15\x38\x22\x03\xb4\xaf\xf7\xc8\xb3\xe4\x6e\x23\x0c\x18\x55\xeb\x02\xa1\x50\x1c\x41\x18\xa8\x44\x81\xd2\x20\x87\x5a\x72\xd4\x60\x37\x08\x17\x3b\x56\x6c\x10\x7e\xcd\xde\x87\x5d\x28\x55\x2d\x79\x22\xa4\xdb\xff\x7c\xfd\xf1\xea\xe6\xf6\x0a\x4a\x51\x21\x74\x6b\x5a\x29\x0b\x5c\x68\x2c\xac\xd2\xcf\xa0\x4a\xb0\x91\x32\xab\x11\xb3\x64\x91\xb7\x6d\x92\x34\x0d\x70\x2c\x85\x44\x48\xb7\x8a\x63\x95\x42\xb7\x3a\xdd\x3d\xac\xe1\xc3\x39\xac\x98\x41\x98\x66\x1f\x95\x2c\xc5\x3a\xfb\x3b\x2b\x1e\xd8\x1a\x89\xa8\x69\xc0\xe2\x76\x57\x31\x8b\x90\x6e\x90\x71\xd4\x29\x4c\x03\xfb\x61\x4b\x6c\x77\x4a\xdb\xb0\x95\xe7\x40\xc2\xb3\x1b\xb6\x25\x29\xe4\x33\x19\xec\x74\x03\x4a\x2b\xec\x33\x94\xca\x7b\x3e\x20\x34\xc5\x06\xb7\x2c\x4b\xec\xf3\xee\x78\xc7\xea\xba\xb0\xd0\x24\x93\xc2\x19\x09\x03\xf5\x4e\x72\xae\xb6\xc2\x5a\xb6\x36\x9d\x19\x93\x3c\x87\xeb\x4b\x8f\x0b\x92\xda\x2c\x99\x5c\x5f\x7a\xb1\xd7\x97\xd9\x1d\xe9\x68\x5b\xb8\x0f\x0b\xb7\x4e\xc5\x1d\x5b\x43\xdb\xde\x27\x93\xa6\x39\x03\xcd\xe4\x1a\x61\xfa\x7d\x09\xd3\x92\x70\x9a\x66\x9f\x04\x56\xdc\x38\xf1\x93\xce\xcd\xb2\xe3\x74\x5b\x24\x71\xa3\x88\x84\x94\xee\x59\x55\x63\xb0\x20\xf5\xc4\x9d\x47\x29\x94\x44\x9f\x25\x00\x00\x93\x51\x39\x4d\x03\xa2\x74\x2c\xa2\xaa\xd8\xaa\x22\xb6\x45\xd3\x00\x4a\xda\xf6\x2c\xc1\x0b\x4f\x2b\x95\x75\x72\x50\x1a\x61\xc5\x9e\x76\xee\x63\xd1\x9d\x73\x24\xa3\x32\xe8\x85\xbc\x8e\x62\xaf\xce\x03\x12\x7f\x3f\x0a\xbb\x81\x69\x76\xc5\xd7\x78\x00\xc4\xff\x3b\x20\xa0\xb1\x62\x56\x28\x69\x72\x74\x3b\x14\x76\x65\x37\xa8\x41\x2a\x8e\x26\xe4\xf2\x5a\xb3\xdd\x26\xf3\x22\xee\x02\x70\x06\x98\x46\x58\xa1\x90\x6b\xd8\xa9\x5d\x4d\x56\x72\x58\x3d\x9f\xe4\xcd\x3f\x6a\xd4\xcf\xf0\xb8\x41\x09\xc8\xd6\xa8\xcf\x2a\xc5\x38\x71\xd1\x71\x40\x8a\xfb\xc4\xdb\x15\x33\xf9\x95\xfb\x7f\x1b\x25\x3f\xa4\xce\xb8\xf4\xfe\xe0\xe4\x59\xf0\x32\x5f\xc0\x05\xe7\x82\x7c\x60\x95\x8f\x99\x01\xab\x80\xf1\xde\x14\x63\x95\xa6\xf3\xc2\xb5\xd8\xa3\xce\xc0\x1d\x3a\xc7\x3c\xb5\xdb\x5d\x45\x89\xb3\xd3\x42\xda\x12\x52\x2e\x58\x85\x85\xcd\xdf\x99\xdc\xa3\xed\x05\xa6\x30\xcd\x6e\x3b\x29\x81\x57\x94\xb0\x61\xe6\x2e\x44\xc7\x8b\x72\x30\xd3\xee\x93\x1d\x6e\x64\xa3\x21\x7a\x83\xf1\xb5\x89\x4d\x3e\xc9\x06\xcf\x93\xb3\x5e\x4a\x77\xb8\x5c\x01\x38\xcd\x81\xa3\x93\xff\xe7\xb2\xe1\xa4\x0a\x78\x71\x87\x52\x10\x1d\x51\x24\x94\xb3\xc1\xb9\xc4\x37\x9e\x4b\x4f\x1b\x0a\x0d\x19\x96\x39\x90\x47\x24\x44\xa7\x0c\xb3\x2f\x52\xfc\xa8\x89\xe7\xeb\xb7\xfe\x94\x2c\x3c\x1b\x9d\xca\x5e\x62\xd3\x74\x30\xe1\xc9\x29\xcc\xc2\x69\x1c\x39\x62\x79\x0e\x94\xc6\xc8\x49\x58\x0c\xa2\x90\xa5\xd2\x5b\x87\xa3\x03\x50\x23\xd5\x5e\x97\xee\x25\x30\xc7\xe8\x90\x7b\x64\xa6\x93\x00\x33\x47\xf6\xa3\x46\x63\x91\xcf\x09\xe6\xe1\x39\x51\x14\x00\x3a\x27\xb1\xc6\xaf\x4d\x03\x15\x4a\x67\xe4\xb7\x95\x52\x55\x08\x7a\x07\xb9\x58\x0e\x60\x7f\x01\xf5\xdf\xf5\x95\x26\xe5\xb6\xd6\xd2\x44\x78\x1f\x21\xdb\x45\x44\x03\x93\x80\x5a\x2b\x4d\xce\xb8\xba\xcd\xd7\xe8\x84\x93\x3b\x84\x7c\xe7\xd2\xb1\x0f\x5d\xb1\x8c\xc2\xb2\x24\x71\x1d\xf5\xaa\xb6\xbd\x00\x77\xb1\xf6\xa0\x67\xc9\xa4\xac\x65\x01\xb3\x91\x54\x9b\xbf\xec\xd1\x6c\x0e\xb3\xff\x25\x1b\x96\xde\xbb\x39\xa5\xef\x44\x94\x80\x59\x04\x39\x21\x3e\x15\x04\xb7\xdb\x0e\x65\x20\x96\x4e\xcb\x9e\x6f\x14\xc6\xf3\x73\x90\xa2\xf2\xdc\x7d\x31\x25\x08\x8f\xb2\x3c\xca\x8d\x63\x20\x97\x3d\xef\x09\x68\x99\xdf\xf2\xc1\x24\x45\x4b\xf8\xf9\x46\xd9\x4f\xb4\x77\x45\x6e\x35\x15\x5b\x61\xf5\x01\x22\xbf\x0f\xcd\x44\xf6\x99\x36\xbd\x07\x6d\x70\x2f\x64\x7b\x2f\x75\xdc\xb1\x25\x69\x4b\x3c\xdf\xb1\xfa\xcf\xce\x0f\xaf\x9f\x5c\xfd\xe0\x6f\xda\xde\xd9\xb4\x4d\x26\x6d\x12\x29\x8b\x3e\x5d\x13\xe4\x0a\xe8\x68\x8d\xe6\x48\x3d\x5b\xae\x24\x1e\x55\xe8\xa6\x39\xa9\xc0\x7d\x57\x34\xd5\x58\x20\xdd\x04\xbe\x63\xf8\x67\xf8\xd7\x6d\x47\x3d\x05\x7a\x8a\xc3\x0d\xea\xee\x6a\xca\xc6\x70\x65\x40\xea\xee\xb6\xf4\x14\x91\xfe\xc0\x39\xfa\xb6\x85\x1f\x35\x6a\x81\xe6\x85\x92\x16\x17\xbb\xb0\xd1\xa7\xfe\xc0\xe8\xb6\x85\x45\x4c\x35\x8f\xb5\xcc\xe6\x70\x9c\xd4\xe1\xfa\x6d\x0e\xa1\x99\xfd\x1c\x0b\xf8\x58\x09\x94\xb6\xf1\x7d\x9b\xcf\x8d\x48\x59\xe6\xd7\xdb\x79\x16\xab\x39\x22\x9a\xfb\x08\xf6\x51\xcb\x73\xf8\xb2\xe3\x84\x7d\x28\x2c\x0c\x56\xb5\xa8\xa8\x9d\xa6\x92\x58\xd3\x26\x15\x36\xd7\x11\x0f\x7d\xce\x73\xb8\x51\x16\xc1\x6e\x98\x5d\xc2\xb3\xaa\x41\x22\x72\xba\x15\x0b\x56\x55\x43\xe2\x2f\xf2\x51\xb3\xdd\x6c\x0e\x2b\x2c\x95\x46\x47\xd1\x8b\xdd\xa2\xdd\x28\xbe\xf4\x85\xea\x48\x4d\xd2\x15\x2c\x6f\x1e\x72\x28\xb5\xda\x02\x03\xab\x99\x34\xac\xa0\xda\xbd\x04\x26\xb9\x8b\x49\xb4\xe8\x98\x0a\xb5\xa5\x1e\x0c\x39\x15\x30\xad\xaa\x8a\x0a\x18\x2b\x1e\xb2\xe4\x4d\xe1\xf2\xc8\x84\x48\x85\x75\xbf\xfa\xbb\x44\x0a\xd4\x9f\x8a\x53\x2f\xe9\x34\x4a\x5d\x68\x1c\x6a\x50\xbb\x1f\x13\xba\x6f\x6a\xfa\x09\xf3\x3f\xc2\x05\x58\x69\x51\x83\xf0\x84\x45\xa5\x0c\xf2\x25\x89\x35\xca\xf3\x53\x94\x24\x3e\xd9\x3e\xe3\x1f\x45\x55\xc1\x0a\x01\x9f\xb0\xa8\x09\x36\xbb\xd1\xaa\x5e\x6f\x9c\x66\xdf\x94\xc1\xe3\x46\x14\x1b\x28\x34\x32\x4f\x30\x40\xfd\xad\xc0\x86\x6c\x18\xac\x13\x9e\xf6\x69\x09\xea\x81\x4e\xed\x38\x6a\x59\xd7\x1a\xce\x16\xf6\xe9\xd2\x7d\xce\x13\xaa\xe2\x3f\xa9\x07\x77\x6e\x76\x4c\x8a\x62\x96\x86\x89\xac\x6d\x3f\x9c\x0c\x50\x54\x84\x07\x38\xb1\x30\x4a\xa5\xee\x74\x4c\x5e\xd5\x0c\xe7\x60\x9f\x32\xae\xf7\x7d\xec\x8f\xc8\xbb\xd0\xdd\x5a\xed\x1a\x89\xed\xae\xc2\x2d\x4a\xeb\xa3\x57\x6e\x6d\xe6\x77\x50\xbf\x11\x2b\x4f\x3e\x9b\x53\xb7\x46\x12\x9b\x64\xb2\x67\xba\x3f\xa4\x7e\xd5\x64\xbf\xf9\xff\xc9\xa4\xdb\xc8\xfe\xa5\x85\xc5\x8e\x39\x8d\x45\xce\xc8\xcd\x31\x2a\x67\x9c\xaf\xdd\xb3\x54\xf0\xf3\x77\xfb\x74\x79\x12\x86\xeb\xcb\xf9\x7c\xd0\x2f\x8a\xf1\x91\x2e\xdc\xb8\xc3\x19\x8a\xae\xa7\x51\x03\x97\x30\x98\xe9\xce\xff\x6a\x02\xd7\xdf\xc8\x5c\x7f\xc3\xf9\x49\x2b\x5c\x78\x53\x53\xc6\x03\xc1\x3b\x93\xbd\xa3\xf6\xbf\x37\xf6\x64\x0c\x8c\x1b\x81\xc1\x28\x18\x5a\x81\x7d\xc8\x3b\x53\x42\xdb\xfe\x05\xf6\xf0\xd3\xa0\x0b\x78\x93\xe5\xce\xdc\x81\xa6\x6b\x73\x27\xb6\xbd\x9e\x71\x31\xfb\xec\x93\x6b\x45\x67\x56\x6c\x31\xbb\xb8\xb9\xbd\xfe\x38\x8f\x04\x39\xd7\x83\xb4\x2e\xb5\x5e\x95\xb7\xd8\x1f\x73\xbf\x4a\x3e\x08\xbd\x8b\xfb\x62\x3f\xd0\xdf\x37\x17\x51\xc3\x11\x49\xfd\x6f\x90\x79\x11\x98\x31\x21\x7d\x34\x5e\xc4\xe7\x8f\xe0\x79\x55\xea\x91\x88\xd7\x78\x4e\x21\x3a\x48\x89\xc4\xc8\x38\xd3\xfa\x7f\xc7\xe3\x64\xf8\x1e\x28\xfa\xed\xd9\xe2\xec\x97\xf9\x2f\xf3\xbe\xb4\x84\xed\x50\x03\xc2\xdc\x40\xe3\x89\xe4\xfe\xb1\xa5\x77\x78\xe6\xfa\x67\x5a\xfa\x62\x50\x5f\xba\x67\x2a\x3e\xef\xae\x50\xc1\x07\x93\x03\x35\x44\x1a\xbb\xd7\x37\x3f\x00\x75\x6d\xcd\xf5\x65\x78\x4e\x79\x53\x75\x12\x7c\x36\x77\xd2\x9a\x64\x22\xf8\x12\xbe\xd3\x11\x32\x56\x17\x4a\xee\xb3\x0b\xab\xc4\xb1\x00\x2a\x20\xbd\x7f\x82\x27\xa7\x4d\xa4\xa9\x44\xe1\xfa\xb9\x5d\x55\x6b\x56\x0d\x5b\x81\x03\x81\x2f\xe6\x0c\x76\x4c\x1b\x77\x8e\xfd\xb2\x2a\x8f\xba\x94\x7e\xf6\xed\xd9\xbe\x7e\x1b\x38\xe1\xb4\xba\xb9\x12\x9f\x2c\x19\x32\x85\xf4\x96\x68\xd3\x03\x8f\xbf\x14\x5e\x79\x83\xe8\xfa\xdb\x2d\x93\xcf\xa7\x4f\x10\xe3\x6f\x0c\x51\x17\x36\x0e\x75\x6c\xf4\x1c\xfc\x2d\x34\x2b\xca\x75\xf7\xe9\x26\x1f\xea\xd1\xbe\x0b\x32\xca\x97\xe3\x13\x19\xdd\x00\x1e\xad\x7d\xfd\x2e\xbe\x75\x77\x1a\x9c\x43\x51\xae\xe9\xd2\x1b\x98\xd3\x34\xf9\x02\x2e\x0e\x2f\x18\xee\x71\x81\x1a\x29\x4a\x33\xff\x68\x70\x66\xd9\xda\x74\xaf\x1d\xc7\x8f\xa2\xd1\xc3\x97\x7b\xf6\xea\x9e\x36\xee\xd8\xda\x8f\xc3\x7e\x52\x8f\xae\x0f\x1b\x66\xdf\x6e\x0e\xa4\x65\x78\xdf\x41\x70\x78\xa3\xb3\x74\x9d\xa7\x67\x69\xbf\x78\x1f\x6f\xbf\x64\xbc\xeb\x74\x0a\x26\xa9\xaf\x51\x7b\xd4\x5a\x74\xb3\x9a\xd2\xee\xcd\xd8\xbf\xe1\xb0\xb1\xc7\x1d\xd7\x6f\xb1\x62\xe3\x5e\x01\xb2\x71\x5f\x47\x9e\x75\xc8\x1c\x94\xbc\x6d\x93\xff\x04\x00\x00\xff\xff\x3c\x5d\xd3\x67\xf3\x16\x00\x00") func templateEntTmplBytes() ([]byte, error) { return bindataRead( @@ -835,7 +835,7 @@ func templateEntTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/ent.tmpl", size: 5861, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/ent.tmpl", size: 5875, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/ent.tmpl b/entc/gen/template/ent.tmpl index b4487fab0..7a069433c 100644 --- a/entc/gen/template/ent.tmpl +++ b/entc/gen/template/ent.tmpl @@ -74,7 +74,7 @@ type {{ $.Name }}Edges struct { {{ $func := print "Query" $e.StructField }} // {{ $func }} queries the {{ $e.Name }} edge of the {{ $.Name }}. func ({{ $receiver }} *{{ $.Name }}) {{ $func }}() *{{ $e.Type.Name}}Query { - return (&{{ $.Name }}Client{ {{ $receiver }}.config}).{{ $func }}({{ $receiver }}) + return (&{{ $.Name }}Client{config: {{ $receiver }}.config}).{{ $func }}({{ $receiver }}) } {{ end }} @@ -82,7 +82,7 @@ type {{ $.Name }}Edges struct { // Note that, you need to call {{ $.Name }}.Unwrap() before calling this method, if this {{ $.Name }} // was returned from a transaction, and the transaction was committed or rolled back. func ({{ $receiver }} *{{ $.Name }}) Update() *{{ $.Name }}UpdateOne { - return (&{{ $.Name }}Client{ {{ $receiver }}.config}).UpdateOne({{ $receiver }}) + return (&{{ $.Name }}Client{config: {{ $receiver }}.config}).UpdateOne({{ $receiver }}) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/config/ent/user.go b/entc/integration/config/ent/user.go index 8349dbd7d..0c3cef87a 100644 --- a/entc/integration/config/ent/user.go +++ b/entc/integration/config/ent/user.go @@ -47,7 +47,7 @@ func (u *User) assignValues(values ...interface{}) error { // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/customid/ent/blob.go b/entc/integration/customid/ent/blob.go index 00c7bc0ae..9cbe3f126 100644 --- a/entc/integration/customid/ent/blob.go +++ b/entc/integration/customid/ent/blob.go @@ -55,7 +55,7 @@ func (b *Blob) assignValues(values ...interface{}) error { // Note that, you need to call Blob.Unwrap() before calling this method, if this Blob // was returned from a transaction, and the transaction was committed or rolled back. func (b *Blob) Update() *BlobUpdateOne { - return (&BlobClient{b.config}).UpdateOne(b) + return (&BlobClient{config: b.config}).UpdateOne(b) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/customid/ent/group.go b/entc/integration/customid/ent/group.go index 77593505e..1667811b2 100644 --- a/entc/integration/customid/ent/group.go +++ b/entc/integration/customid/ent/group.go @@ -66,14 +66,14 @@ func (gr *Group) assignValues(values ...interface{}) error { // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/customid/ent/pet.go b/entc/integration/customid/ent/pet.go index ec91feaa7..2a55e53e2 100644 --- a/entc/integration/customid/ent/pet.go +++ b/entc/integration/customid/ent/pet.go @@ -89,14 +89,14 @@ func (pe *Pet) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/customid/ent/user.go b/entc/integration/customid/ent/user.go index c6a5e20d4..a1a91504a 100644 --- a/entc/integration/customid/ent/user.go +++ b/entc/integration/customid/ent/user.go @@ -121,29 +121,29 @@ func (u *User) assignValues(values ...interface{}) error { // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // QueryParent queries the parent edge of the User. func (u *User) QueryParent() *UserQuery { - return (&UserClient{u.config}).QueryParent(u) + return (&UserClient{config: u.config}).QueryParent(u) } // QueryChildren queries the children edge of the User. func (u *User) QueryChildren() *UserQuery { - return (&UserClient{u.config}).QueryChildren(u) + return (&UserClient{config: u.config}).QueryChildren(u) } // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/card.go b/entc/integration/ent/card.go index 044e5ec53..b39bec286 100644 --- a/entc/integration/ent/card.go +++ b/entc/integration/ent/card.go @@ -137,19 +137,19 @@ func (c *Card) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Card. func (c *Card) QueryOwner() *UserQuery { - return (&CardClient{c.config}).QueryOwner(c) + return (&CardClient{config: c.config}).QueryOwner(c) } // QuerySpec queries the spec edge of the Card. func (c *Card) QuerySpec() *SpecQuery { - return (&CardClient{c.config}).QuerySpec(c) + return (&CardClient{config: c.config}).QuerySpec(c) } // Update returns a builder for updating this Card. // Note that, you need to call Card.Unwrap() before calling this method, if this Card // was returned from a transaction, and the transaction was committed or rolled back. func (c *Card) Update() *CardUpdateOne { - return (&CardClient{c.config}).UpdateOne(c) + return (&CardClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/comment.go b/entc/integration/ent/comment.go index c08847431..89b17dcd6 100644 --- a/entc/integration/ent/comment.go +++ b/entc/integration/ent/comment.go @@ -73,7 +73,7 @@ func (c *Comment) assignValues(values ...interface{}) error { // Note that, you need to call Comment.Unwrap() before calling this method, if this Comment // was returned from a transaction, and the transaction was committed or rolled back. func (c *Comment) Update() *CommentUpdateOne { - return (&CommentClient{c.config}).UpdateOne(c) + return (&CommentClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/fieldtype.go b/entc/integration/ent/fieldtype.go index 56be70233..82df16a9e 100644 --- a/entc/integration/ent/fieldtype.go +++ b/entc/integration/ent/fieldtype.go @@ -229,7 +229,7 @@ func (ft *FieldType) assignValues(values ...interface{}) error { // Note that, you need to call FieldType.Unwrap() before calling this method, if this FieldType // was returned from a transaction, and the transaction was committed or rolled back. func (ft *FieldType) Update() *FieldTypeUpdateOne { - return (&FieldTypeClient{ft.config}).UpdateOne(ft) + return (&FieldTypeClient{config: ft.config}).UpdateOne(ft) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/file.go b/entc/integration/ent/file.go index 38f7c729f..90bd08f0c 100644 --- a/entc/integration/ent/file.go +++ b/entc/integration/ent/file.go @@ -156,19 +156,19 @@ func (f *File) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the File. func (f *File) QueryOwner() *UserQuery { - return (&FileClient{f.config}).QueryOwner(f) + return (&FileClient{config: f.config}).QueryOwner(f) } // QueryType queries the type edge of the File. func (f *File) QueryType() *FileTypeQuery { - return (&FileClient{f.config}).QueryType(f) + return (&FileClient{config: f.config}).QueryType(f) } // Update returns a builder for updating this File. // Note that, you need to call File.Unwrap() before calling this method, if this File // was returned from a transaction, and the transaction was committed or rolled back. func (f *File) Update() *FileUpdateOne { - return (&FileClient{f.config}).UpdateOne(f) + return (&FileClient{config: f.config}).UpdateOne(f) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/filetype.go b/entc/integration/ent/filetype.go index 42117f831..6902b515d 100644 --- a/entc/integration/ent/filetype.go +++ b/entc/integration/ent/filetype.go @@ -75,14 +75,14 @@ func (ft *FileType) assignValues(values ...interface{}) error { // QueryFiles queries the files edge of the FileType. func (ft *FileType) QueryFiles() *FileQuery { - return (&FileTypeClient{ft.config}).QueryFiles(ft) + return (&FileTypeClient{config: ft.config}).QueryFiles(ft) } // Update returns a builder for updating this FileType. // Note that, you need to call FileType.Unwrap() before calling this method, if this FileType // was returned from a transaction, and the transaction was committed or rolled back. func (ft *FileType) Update() *FileTypeUpdateOne { - return (&FileTypeClient{ft.config}).UpdateOne(ft) + return (&FileTypeClient{config: ft.config}).UpdateOne(ft) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/group.go b/entc/integration/ent/group.go index 23854e741..0e0ff51f0 100644 --- a/entc/integration/ent/group.go +++ b/entc/integration/ent/group.go @@ -165,29 +165,29 @@ func (gr *Group) assignValues(values ...interface{}) error { // QueryFiles queries the files edge of the Group. func (gr *Group) QueryFiles() *FileQuery { - return (&GroupClient{gr.config}).QueryFiles(gr) + return (&GroupClient{config: gr.config}).QueryFiles(gr) } // QueryBlocked queries the blocked edge of the Group. func (gr *Group) QueryBlocked() *UserQuery { - return (&GroupClient{gr.config}).QueryBlocked(gr) + return (&GroupClient{config: gr.config}).QueryBlocked(gr) } // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // QueryInfo queries the info edge of the Group. func (gr *Group) QueryInfo() *GroupInfoQuery { - return (&GroupClient{gr.config}).QueryInfo(gr) + return (&GroupClient{config: gr.config}).QueryInfo(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/groupinfo.go b/entc/integration/ent/groupinfo.go index e352ce581..f7990f21c 100644 --- a/entc/integration/ent/groupinfo.go +++ b/entc/integration/ent/groupinfo.go @@ -83,14 +83,14 @@ func (gi *GroupInfo) assignValues(values ...interface{}) error { // QueryGroups queries the groups edge of the GroupInfo. func (gi *GroupInfo) QueryGroups() *GroupQuery { - return (&GroupInfoClient{gi.config}).QueryGroups(gi) + return (&GroupInfoClient{config: gi.config}).QueryGroups(gi) } // Update returns a builder for updating this GroupInfo. // Note that, you need to call GroupInfo.Unwrap() before calling this method, if this GroupInfo // was returned from a transaction, and the transaction was committed or rolled back. func (gi *GroupInfo) Update() *GroupInfoUpdateOne { - return (&GroupInfoClient{gi.config}).UpdateOne(gi) + return (&GroupInfoClient{config: gi.config}).UpdateOne(gi) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/item.go b/entc/integration/ent/item.go index 75b5e46b7..9334c841e 100644 --- a/entc/integration/ent/item.go +++ b/entc/integration/ent/item.go @@ -48,7 +48,7 @@ func (i *Item) assignValues(values ...interface{}) error { // Note that, you need to call Item.Unwrap() before calling this method, if this Item // was returned from a transaction, and the transaction was committed or rolled back. func (i *Item) Update() *ItemUpdateOne { - return (&ItemClient{i.config}).UpdateOne(i) + return (&ItemClient{config: i.config}).UpdateOne(i) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/node.go b/entc/integration/ent/node.go index 760e5f4d6..c83ef625c 100644 --- a/entc/integration/ent/node.go +++ b/entc/integration/ent/node.go @@ -113,19 +113,19 @@ func (n *Node) assignValues(values ...interface{}) error { // QueryPrev queries the prev edge of the Node. func (n *Node) QueryPrev() *NodeQuery { - return (&NodeClient{n.config}).QueryPrev(n) + return (&NodeClient{config: n.config}).QueryPrev(n) } // QueryNext queries the next edge of the Node. func (n *Node) QueryNext() *NodeQuery { - return (&NodeClient{n.config}).QueryNext(n) + return (&NodeClient{config: n.config}).QueryNext(n) } // Update returns a builder for updating this Node. // Note that, you need to call Node.Unwrap() before calling this method, if this Node // was returned from a transaction, and the transaction was committed or rolled back. func (n *Node) Update() *NodeUpdateOne { - return (&NodeClient{n.config}).UpdateOne(n) + return (&NodeClient{config: n.config}).UpdateOne(n) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/pet.go b/entc/integration/ent/pet.go index fffa0d2f4..225457f11 100644 --- a/entc/integration/ent/pet.go +++ b/entc/integration/ent/pet.go @@ -122,19 +122,19 @@ func (pe *Pet) assignValues(values ...interface{}) error { // QueryTeam queries the team edge of the Pet. func (pe *Pet) QueryTeam() *UserQuery { - return (&PetClient{pe.config}).QueryTeam(pe) + return (&PetClient{config: pe.config}).QueryTeam(pe) } // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/spec.go b/entc/integration/ent/spec.go index 586dd9250..aa3b76a51 100644 --- a/entc/integration/ent/spec.go +++ b/entc/integration/ent/spec.go @@ -67,14 +67,14 @@ func (s *Spec) assignValues(values ...interface{}) error { // QueryCard queries the card edge of the Spec. func (s *Spec) QueryCard() *CardQuery { - return (&SpecClient{s.config}).QueryCard(s) + return (&SpecClient{config: s.config}).QueryCard(s) } // Update returns a builder for updating this Spec. // Note that, you need to call Spec.Unwrap() before calling this method, if this Spec // was returned from a transaction, and the transaction was committed or rolled back. func (s *Spec) Update() *SpecUpdateOne { - return (&SpecClient{s.config}).UpdateOne(s) + return (&SpecClient{config: s.config}).UpdateOne(s) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/ent/user.go b/entc/integration/ent/user.go index d0121ca38..9cbf19676 100644 --- a/entc/integration/ent/user.go +++ b/entc/integration/ent/user.go @@ -296,64 +296,64 @@ func (u *User) assignValues(values ...interface{}) error { // QueryCard queries the card edge of the User. func (u *User) QueryCard() *CardQuery { - return (&UserClient{u.config}).QueryCard(u) + return (&UserClient{config: u.config}).QueryCard(u) } // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // QueryFiles queries the files edge of the User. func (u *User) QueryFiles() *FileQuery { - return (&UserClient{u.config}).QueryFiles(u) + return (&UserClient{config: u.config}).QueryFiles(u) } // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // QueryFriends queries the friends edge of the User. func (u *User) QueryFriends() *UserQuery { - return (&UserClient{u.config}).QueryFriends(u) + return (&UserClient{config: u.config}).QueryFriends(u) } // QueryFollowers queries the followers edge of the User. func (u *User) QueryFollowers() *UserQuery { - return (&UserClient{u.config}).QueryFollowers(u) + return (&UserClient{config: u.config}).QueryFollowers(u) } // QueryFollowing queries the following edge of the User. func (u *User) QueryFollowing() *UserQuery { - return (&UserClient{u.config}).QueryFollowing(u) + return (&UserClient{config: u.config}).QueryFollowing(u) } // QueryTeam queries the team edge of the User. func (u *User) QueryTeam() *PetQuery { - return (&UserClient{u.config}).QueryTeam(u) + return (&UserClient{config: u.config}).QueryTeam(u) } // QuerySpouse queries the spouse edge of the User. func (u *User) QuerySpouse() *UserQuery { - return (&UserClient{u.config}).QuerySpouse(u) + return (&UserClient{config: u.config}).QuerySpouse(u) } // QueryChildren queries the children edge of the User. func (u *User) QueryChildren() *UserQuery { - return (&UserClient{u.config}).QueryChildren(u) + return (&UserClient{config: u.config}).QueryChildren(u) } // QueryParent queries the parent edge of the User. func (u *User) QueryParent() *UserQuery { - return (&UserClient{u.config}).QueryParent(u) + return (&UserClient{config: u.config}).QueryParent(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/card.go b/entc/integration/gremlin/ent/card.go index db7de7588..8adabf912 100644 --- a/entc/integration/gremlin/ent/card.go +++ b/entc/integration/gremlin/ent/card.go @@ -97,19 +97,19 @@ func (c *Card) FromResponse(res *gremlin.Response) error { // QueryOwner queries the owner edge of the Card. func (c *Card) QueryOwner() *UserQuery { - return (&CardClient{c.config}).QueryOwner(c) + return (&CardClient{config: c.config}).QueryOwner(c) } // QuerySpec queries the spec edge of the Card. func (c *Card) QuerySpec() *SpecQuery { - return (&CardClient{c.config}).QuerySpec(c) + return (&CardClient{config: c.config}).QuerySpec(c) } // Update returns a builder for updating this Card. // Note that, you need to call Card.Unwrap() before calling this method, if this Card // was returned from a transaction, and the transaction was committed or rolled back. func (c *Card) Update() *CardUpdateOne { - return (&CardClient{c.config}).UpdateOne(c) + return (&CardClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/comment.go b/entc/integration/gremlin/ent/comment.go index d213c10b2..397d0dc88 100644 --- a/entc/integration/gremlin/ent/comment.go +++ b/entc/integration/gremlin/ent/comment.go @@ -53,7 +53,7 @@ func (c *Comment) FromResponse(res *gremlin.Response) error { // Note that, you need to call Comment.Unwrap() before calling this method, if this Comment // was returned from a transaction, and the transaction was committed or rolled back. func (c *Comment) Update() *CommentUpdateOne { - return (&CommentClient{c.config}).UpdateOne(c) + return (&CommentClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/fieldtype.go b/entc/integration/gremlin/ent/fieldtype.go index 6320ecad3..8b7b131a4 100644 --- a/entc/integration/gremlin/ent/fieldtype.go +++ b/entc/integration/gremlin/ent/fieldtype.go @@ -130,7 +130,7 @@ func (ft *FieldType) FromResponse(res *gremlin.Response) error { // Note that, you need to call FieldType.Unwrap() before calling this method, if this FieldType // was returned from a transaction, and the transaction was committed or rolled back. func (ft *FieldType) Update() *FieldTypeUpdateOne { - return (&FieldTypeClient{ft.config}).UpdateOne(ft) + return (&FieldTypeClient{config: ft.config}).UpdateOne(ft) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/file.go b/entc/integration/gremlin/ent/file.go index 17d3f11b4..f933f218c 100644 --- a/entc/integration/gremlin/ent/file.go +++ b/entc/integration/gremlin/ent/file.go @@ -99,19 +99,19 @@ func (f *File) FromResponse(res *gremlin.Response) error { // QueryOwner queries the owner edge of the File. func (f *File) QueryOwner() *UserQuery { - return (&FileClient{f.config}).QueryOwner(f) + return (&FileClient{config: f.config}).QueryOwner(f) } // QueryType queries the type edge of the File. func (f *File) QueryType() *FileTypeQuery { - return (&FileClient{f.config}).QueryType(f) + return (&FileClient{config: f.config}).QueryType(f) } // Update returns a builder for updating this File. // Note that, you need to call File.Unwrap() before calling this method, if this File // was returned from a transaction, and the transaction was committed or rolled back. func (f *File) Update() *FileUpdateOne { - return (&FileClient{f.config}).UpdateOne(f) + return (&FileClient{config: f.config}).UpdateOne(f) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/filetype.go b/entc/integration/gremlin/ent/filetype.go index 834dde789..3f58a19f7 100644 --- a/entc/integration/gremlin/ent/filetype.go +++ b/entc/integration/gremlin/ent/filetype.go @@ -64,14 +64,14 @@ func (ft *FileType) FromResponse(res *gremlin.Response) error { // QueryFiles queries the files edge of the FileType. func (ft *FileType) QueryFiles() *FileQuery { - return (&FileTypeClient{ft.config}).QueryFiles(ft) + return (&FileTypeClient{config: ft.config}).QueryFiles(ft) } // Update returns a builder for updating this FileType. // Note that, you need to call FileType.Unwrap() before calling this method, if this FileType // was returned from a transaction, and the transaction was committed or rolled back. func (ft *FileType) Update() *FileTypeUpdateOne { - return (&FileTypeClient{ft.config}).UpdateOne(ft) + return (&FileTypeClient{config: ft.config}).UpdateOne(ft) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/group.go b/entc/integration/gremlin/ent/group.go index bf253ff79..79ad496e2 100644 --- a/entc/integration/gremlin/ent/group.go +++ b/entc/integration/gremlin/ent/group.go @@ -120,29 +120,29 @@ func (gr *Group) FromResponse(res *gremlin.Response) error { // QueryFiles queries the files edge of the Group. func (gr *Group) QueryFiles() *FileQuery { - return (&GroupClient{gr.config}).QueryFiles(gr) + return (&GroupClient{config: gr.config}).QueryFiles(gr) } // QueryBlocked queries the blocked edge of the Group. func (gr *Group) QueryBlocked() *UserQuery { - return (&GroupClient{gr.config}).QueryBlocked(gr) + return (&GroupClient{config: gr.config}).QueryBlocked(gr) } // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // QueryInfo queries the info edge of the Group. func (gr *Group) QueryInfo() *GroupInfoQuery { - return (&GroupClient{gr.config}).QueryInfo(gr) + return (&GroupClient{config: gr.config}).QueryInfo(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/groupinfo.go b/entc/integration/gremlin/ent/groupinfo.go index a464fa75d..3930bee57 100644 --- a/entc/integration/gremlin/ent/groupinfo.go +++ b/entc/integration/gremlin/ent/groupinfo.go @@ -68,14 +68,14 @@ func (gi *GroupInfo) FromResponse(res *gremlin.Response) error { // QueryGroups queries the groups edge of the GroupInfo. func (gi *GroupInfo) QueryGroups() *GroupQuery { - return (&GroupInfoClient{gi.config}).QueryGroups(gi) + return (&GroupInfoClient{config: gi.config}).QueryGroups(gi) } // Update returns a builder for updating this GroupInfo. // Note that, you need to call GroupInfo.Unwrap() before calling this method, if this GroupInfo // was returned from a transaction, and the transaction was committed or rolled back. func (gi *GroupInfo) Update() *GroupInfoUpdateOne { - return (&GroupInfoClient{gi.config}).UpdateOne(gi) + return (&GroupInfoClient{config: gi.config}).UpdateOne(gi) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/item.go b/entc/integration/gremlin/ent/item.go index f17545f3e..f3cf3bb7e 100644 --- a/entc/integration/gremlin/ent/item.go +++ b/entc/integration/gremlin/ent/item.go @@ -41,7 +41,7 @@ func (i *Item) FromResponse(res *gremlin.Response) error { // Note that, you need to call Item.Unwrap() before calling this method, if this Item // was returned from a transaction, and the transaction was committed or rolled back. func (i *Item) Update() *ItemUpdateOne { - return (&ItemClient{i.config}).UpdateOne(i) + return (&ItemClient{config: i.config}).UpdateOne(i) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/node.go b/entc/integration/gremlin/ent/node.go index 8b3c4c58a..d6e9a0a4c 100644 --- a/entc/integration/gremlin/ent/node.go +++ b/entc/integration/gremlin/ent/node.go @@ -86,19 +86,19 @@ func (n *Node) FromResponse(res *gremlin.Response) error { // QueryPrev queries the prev edge of the Node. func (n *Node) QueryPrev() *NodeQuery { - return (&NodeClient{n.config}).QueryPrev(n) + return (&NodeClient{config: n.config}).QueryPrev(n) } // QueryNext queries the next edge of the Node. func (n *Node) QueryNext() *NodeQuery { - return (&NodeClient{n.config}).QueryNext(n) + return (&NodeClient{config: n.config}).QueryNext(n) } // Update returns a builder for updating this Node. // Note that, you need to call Node.Unwrap() before calling this method, if this Node // was returned from a transaction, and the transaction was committed or rolled back. func (n *Node) Update() *NodeUpdateOne { - return (&NodeClient{n.config}).UpdateOne(n) + return (&NodeClient{config: n.config}).UpdateOne(n) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/pet.go b/entc/integration/gremlin/ent/pet.go index 61e1f0ae8..5574b6560 100644 --- a/entc/integration/gremlin/ent/pet.go +++ b/entc/integration/gremlin/ent/pet.go @@ -86,19 +86,19 @@ func (pe *Pet) FromResponse(res *gremlin.Response) error { // QueryTeam queries the team edge of the Pet. func (pe *Pet) QueryTeam() *UserQuery { - return (&PetClient{pe.config}).QueryTeam(pe) + return (&PetClient{config: pe.config}).QueryTeam(pe) } // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/spec.go b/entc/integration/gremlin/ent/spec.go index 8370071a0..37fc8808d 100644 --- a/entc/integration/gremlin/ent/spec.go +++ b/entc/integration/gremlin/ent/spec.go @@ -60,14 +60,14 @@ func (s *Spec) FromResponse(res *gremlin.Response) error { // QueryCard queries the card edge of the Spec. func (s *Spec) QueryCard() *CardQuery { - return (&SpecClient{s.config}).QueryCard(s) + return (&SpecClient{config: s.config}).QueryCard(s) } // Update returns a builder for updating this Spec. // Note that, you need to call Spec.Unwrap() before calling this method, if this Spec // was returned from a transaction, and the transaction was committed or rolled back. func (s *Spec) Update() *SpecUpdateOne { - return (&SpecClient{s.config}).UpdateOne(s) + return (&SpecClient{config: s.config}).UpdateOne(s) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/gremlin/ent/user.go b/entc/integration/gremlin/ent/user.go index 2939c5a92..2fbc24874 100644 --- a/entc/integration/gremlin/ent/user.go +++ b/entc/integration/gremlin/ent/user.go @@ -225,64 +225,64 @@ func (u *User) FromResponse(res *gremlin.Response) error { // QueryCard queries the card edge of the User. func (u *User) QueryCard() *CardQuery { - return (&UserClient{u.config}).QueryCard(u) + return (&UserClient{config: u.config}).QueryCard(u) } // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // QueryFiles queries the files edge of the User. func (u *User) QueryFiles() *FileQuery { - return (&UserClient{u.config}).QueryFiles(u) + return (&UserClient{config: u.config}).QueryFiles(u) } // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // QueryFriends queries the friends edge of the User. func (u *User) QueryFriends() *UserQuery { - return (&UserClient{u.config}).QueryFriends(u) + return (&UserClient{config: u.config}).QueryFriends(u) } // QueryFollowers queries the followers edge of the User. func (u *User) QueryFollowers() *UserQuery { - return (&UserClient{u.config}).QueryFollowers(u) + return (&UserClient{config: u.config}).QueryFollowers(u) } // QueryFollowing queries the following edge of the User. func (u *User) QueryFollowing() *UserQuery { - return (&UserClient{u.config}).QueryFollowing(u) + return (&UserClient{config: u.config}).QueryFollowing(u) } // QueryTeam queries the team edge of the User. func (u *User) QueryTeam() *PetQuery { - return (&UserClient{u.config}).QueryTeam(u) + return (&UserClient{config: u.config}).QueryTeam(u) } // QuerySpouse queries the spouse edge of the User. func (u *User) QuerySpouse() *UserQuery { - return (&UserClient{u.config}).QuerySpouse(u) + return (&UserClient{config: u.config}).QuerySpouse(u) } // QueryChildren queries the children edge of the User. func (u *User) QueryChildren() *UserQuery { - return (&UserClient{u.config}).QueryChildren(u) + return (&UserClient{config: u.config}).QueryChildren(u) } // QueryParent queries the parent edge of the User. func (u *User) QueryParent() *UserQuery { - return (&UserClient{u.config}).QueryParent(u) + return (&UserClient{config: u.config}).QueryParent(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/idtype/ent/user.go b/entc/integration/idtype/ent/user.go index 8a34fb05a..72d121f65 100644 --- a/entc/integration/idtype/ent/user.go +++ b/entc/integration/idtype/ent/user.go @@ -118,24 +118,24 @@ func (u *User) assignValues(values ...interface{}) error { // QuerySpouse queries the spouse edge of the User. func (u *User) QuerySpouse() *UserQuery { - return (&UserClient{u.config}).QuerySpouse(u) + return (&UserClient{config: u.config}).QuerySpouse(u) } // QueryFollowers queries the followers edge of the User. func (u *User) QueryFollowers() *UserQuery { - return (&UserClient{u.config}).QueryFollowers(u) + return (&UserClient{config: u.config}).QueryFollowers(u) } // QueryFollowing queries the following edge of the User. func (u *User) QueryFollowing() *UserQuery { - return (&UserClient{u.config}).QueryFollowing(u) + return (&UserClient{config: u.config}).QueryFollowing(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/json/ent/user.go b/entc/integration/json/ent/user.go index 0f0ae537b..a81ab5190 100644 --- a/entc/integration/json/ent/user.go +++ b/entc/integration/json/ent/user.go @@ -116,7 +116,7 @@ func (u *User) assignValues(values ...interface{}) error { // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv1/car.go b/entc/integration/migrate/entv1/car.go index 181ba9293..e25088cad 100644 --- a/entc/integration/migrate/entv1/car.go +++ b/entc/integration/migrate/entv1/car.go @@ -89,14 +89,14 @@ func (c *Car) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Car. func (c *Car) QueryOwner() *UserQuery { - return (&CarClient{c.config}).QueryOwner(c) + return (&CarClient{config: c.config}).QueryOwner(c) } // Update returns a builder for updating this Car. // Note that, you need to call Car.Unwrap() before calling this method, if this Car // was returned from a transaction, and the transaction was committed or rolled back. func (c *Car) Update() *CarUpdateOne { - return (&CarClient{c.config}).UpdateOne(c) + return (&CarClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv1/user.go b/entc/integration/migrate/entv1/user.go index f178daf9f..6914d9055 100644 --- a/entc/integration/migrate/entv1/user.go +++ b/entc/integration/migrate/entv1/user.go @@ -196,29 +196,29 @@ func (u *User) assignValues(values ...interface{}) error { // QueryParent queries the parent edge of the User. func (u *User) QueryParent() *UserQuery { - return (&UserClient{u.config}).QueryParent(u) + return (&UserClient{config: u.config}).QueryParent(u) } // QueryChildren queries the children edge of the User. func (u *User) QueryChildren() *UserQuery { - return (&UserClient{u.config}).QueryChildren(u) + return (&UserClient{config: u.config}).QueryChildren(u) } // QuerySpouse queries the spouse edge of the User. func (u *User) QuerySpouse() *UserQuery { - return (&UserClient{u.config}).QuerySpouse(u) + return (&UserClient{config: u.config}).QuerySpouse(u) } // QueryCar queries the car edge of the User. func (u *User) QueryCar() *CarQuery { - return (&UserClient{u.config}).QueryCar(u) + return (&UserClient{config: u.config}).QueryCar(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv2/car.go b/entc/integration/migrate/entv2/car.go index 51be3ed02..3380e2c0d 100644 --- a/entc/integration/migrate/entv2/car.go +++ b/entc/integration/migrate/entv2/car.go @@ -89,14 +89,14 @@ func (c *Car) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Car. func (c *Car) QueryOwner() *UserQuery { - return (&CarClient{c.config}).QueryOwner(c) + return (&CarClient{config: c.config}).QueryOwner(c) } // Update returns a builder for updating this Car. // Note that, you need to call Car.Unwrap() before calling this method, if this Car // was returned from a transaction, and the transaction was committed or rolled back. func (c *Car) Update() *CarUpdateOne { - return (&CarClient{c.config}).UpdateOne(c) + return (&CarClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv2/group.go b/entc/integration/migrate/entv2/group.go index 2e9164aa2..46e6d6158 100644 --- a/entc/integration/migrate/entv2/group.go +++ b/entc/integration/migrate/entv2/group.go @@ -47,7 +47,7 @@ func (gr *Group) assignValues(values ...interface{}) error { // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv2/pet.go b/entc/integration/migrate/entv2/pet.go index fb0aa0fd2..5af3c89ff 100644 --- a/entc/integration/migrate/entv2/pet.go +++ b/entc/integration/migrate/entv2/pet.go @@ -47,7 +47,7 @@ func (pe *Pet) assignValues(values ...interface{}) error { // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/migrate/entv2/user.go b/entc/integration/migrate/entv2/user.go index 2ae295a8a..202562825 100644 --- a/entc/integration/migrate/entv2/user.go +++ b/entc/integration/migrate/entv2/user.go @@ -172,19 +172,19 @@ func (u *User) assignValues(values ...interface{}) error { // QueryCar queries the car edge of the User. func (u *User) QueryCar() *CarQuery { - return (&UserClient{u.config}).QueryCar(u) + return (&UserClient{config: u.config}).QueryCar(u) } // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/template/ent/group.go b/entc/integration/template/ent/group.go index 6f184d294..477160f39 100644 --- a/entc/integration/template/ent/group.go +++ b/entc/integration/template/ent/group.go @@ -55,7 +55,7 @@ func (gr *Group) assignValues(values ...interface{}) error { // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/template/ent/pet.go b/entc/integration/template/ent/pet.go index dc309191a..80ca19128 100644 --- a/entc/integration/template/ent/pet.go +++ b/entc/integration/template/ent/pet.go @@ -107,14 +107,14 @@ func (pe *Pet) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/entc/integration/template/ent/user.go b/entc/integration/template/ent/user.go index ed459a31f..5fdbfcb29 100644 --- a/entc/integration/template/ent/user.go +++ b/entc/integration/template/ent/user.go @@ -85,19 +85,19 @@ func (u *User) assignValues(values ...interface{}) error { // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // QueryFriends queries the friends edge of the User. func (u *User) QueryFriends() *UserQuery { - return (&UserClient{u.config}).QueryFriends(u) + return (&UserClient{config: u.config}).QueryFriends(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/edgeindex/ent/city.go b/examples/edgeindex/ent/city.go index a64c449ae..dbcebec86 100644 --- a/examples/edgeindex/ent/city.go +++ b/examples/edgeindex/ent/city.go @@ -74,14 +74,14 @@ func (c *City) assignValues(values ...interface{}) error { // QueryStreets queries the streets edge of the City. func (c *City) QueryStreets() *StreetQuery { - return (&CityClient{c.config}).QueryStreets(c) + return (&CityClient{config: c.config}).QueryStreets(c) } // Update returns a builder for updating this City. // Note that, you need to call City.Unwrap() before calling this method, if this City // was returned from a transaction, and the transaction was committed or rolled back. func (c *City) Update() *CityUpdateOne { - return (&CityClient{c.config}).UpdateOne(c) + return (&CityClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/edgeindex/ent/street.go b/examples/edgeindex/ent/street.go index fcbfe6ea5..1e3d2aa9c 100644 --- a/examples/edgeindex/ent/street.go +++ b/examples/edgeindex/ent/street.go @@ -97,14 +97,14 @@ func (s *Street) assignValues(values ...interface{}) error { // QueryCity queries the city edge of the Street. func (s *Street) QueryCity() *CityQuery { - return (&StreetClient{s.config}).QueryCity(s) + return (&StreetClient{config: s.config}).QueryCity(s) } // Update returns a builder for updating this Street. // Note that, you need to call Street.Unwrap() before calling this method, if this Street // was returned from a transaction, and the transaction was committed or rolled back. func (s *Street) Update() *StreetUpdateOne { - return (&StreetClient{s.config}).UpdateOne(s) + return (&StreetClient{config: s.config}).UpdateOne(s) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/entcpkg/ent/user.go b/examples/entcpkg/ent/user.go index 4cee633ae..5a219500e 100644 --- a/examples/entcpkg/ent/user.go +++ b/examples/entcpkg/ent/user.go @@ -47,7 +47,7 @@ func (u *User) assignValues(values ...interface{}) error { // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/m2m2types/ent/group.go b/examples/m2m2types/ent/group.go index 7c35097cf..a7df24a12 100644 --- a/examples/m2m2types/ent/group.go +++ b/examples/m2m2types/ent/group.go @@ -74,14 +74,14 @@ func (gr *Group) assignValues(values ...interface{}) error { // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/m2m2types/ent/user.go b/examples/m2m2types/ent/user.go index 9da54925d..b13105619 100644 --- a/examples/m2m2types/ent/user.go +++ b/examples/m2m2types/ent/user.go @@ -82,14 +82,14 @@ func (u *User) assignValues(values ...interface{}) error { // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/m2mbidi/ent/user.go b/examples/m2mbidi/ent/user.go index cb6cc8498..827ecd16b 100644 --- a/examples/m2mbidi/ent/user.go +++ b/examples/m2mbidi/ent/user.go @@ -82,14 +82,14 @@ func (u *User) assignValues(values ...interface{}) error { // QueryFriends queries the friends edge of the User. func (u *User) QueryFriends() *UserQuery { - return (&UserClient{u.config}).QueryFriends(u) + return (&UserClient{config: u.config}).QueryFriends(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/m2mrecur/ent/user.go b/examples/m2mrecur/ent/user.go index 803468867..f83f4adab 100644 --- a/examples/m2mrecur/ent/user.go +++ b/examples/m2mrecur/ent/user.go @@ -93,19 +93,19 @@ func (u *User) assignValues(values ...interface{}) error { // QueryFollowers queries the followers edge of the User. func (u *User) QueryFollowers() *UserQuery { - return (&UserClient{u.config}).QueryFollowers(u) + return (&UserClient{config: u.config}).QueryFollowers(u) } // QueryFollowing queries the following edge of the User. func (u *User) QueryFollowing() *UserQuery { - return (&UserClient{u.config}).QueryFollowing(u) + return (&UserClient{config: u.config}).QueryFollowing(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2m2types/ent/pet.go b/examples/o2m2types/ent/pet.go index 6caebece4..3062f4b40 100644 --- a/examples/o2m2types/ent/pet.go +++ b/examples/o2m2types/ent/pet.go @@ -97,14 +97,14 @@ func (pe *Pet) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2m2types/ent/user.go b/examples/o2m2types/ent/user.go index 1f439aad0..d803723a8 100644 --- a/examples/o2m2types/ent/user.go +++ b/examples/o2m2types/ent/user.go @@ -82,14 +82,14 @@ func (u *User) assignValues(values ...interface{}) error { // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2mrecur/ent/node.go b/examples/o2mrecur/ent/node.go index 195a7caeb..a512fc732 100644 --- a/examples/o2mrecur/ent/node.go +++ b/examples/o2mrecur/ent/node.go @@ -107,19 +107,19 @@ func (n *Node) assignValues(values ...interface{}) error { // QueryParent queries the parent edge of the Node. func (n *Node) QueryParent() *NodeQuery { - return (&NodeClient{n.config}).QueryParent(n) + return (&NodeClient{config: n.config}).QueryParent(n) } // QueryChildren queries the children edge of the Node. func (n *Node) QueryChildren() *NodeQuery { - return (&NodeClient{n.config}).QueryChildren(n) + return (&NodeClient{config: n.config}).QueryChildren(n) } // Update returns a builder for updating this Node. // Note that, you need to call Node.Unwrap() before calling this method, if this Node // was returned from a transaction, and the transaction was committed or rolled back. func (n *Node) Update() *NodeUpdateOne { - return (&NodeClient{n.config}).UpdateOne(n) + return (&NodeClient{config: n.config}).UpdateOne(n) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2o2types/ent/card.go b/examples/o2o2types/ent/card.go index f1984b9f3..e70c2f4f5 100644 --- a/examples/o2o2types/ent/card.go +++ b/examples/o2o2types/ent/card.go @@ -106,14 +106,14 @@ func (c *Card) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Card. func (c *Card) QueryOwner() *UserQuery { - return (&CardClient{c.config}).QueryOwner(c) + return (&CardClient{config: c.config}).QueryOwner(c) } // Update returns a builder for updating this Card. // Note that, you need to call Card.Unwrap() before calling this method, if this Card // was returned from a transaction, and the transaction was committed or rolled back. func (c *Card) Update() *CardUpdateOne { - return (&CardClient{c.config}).UpdateOne(c) + return (&CardClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2o2types/ent/user.go b/examples/o2o2types/ent/user.go index 4d3e931d8..3dd83b984 100644 --- a/examples/o2o2types/ent/user.go +++ b/examples/o2o2types/ent/user.go @@ -88,14 +88,14 @@ func (u *User) assignValues(values ...interface{}) error { // QueryCard queries the card edge of the User. func (u *User) QueryCard() *CardQuery { - return (&UserClient{u.config}).QueryCard(u) + return (&UserClient{config: u.config}).QueryCard(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2obidi/ent/user.go b/examples/o2obidi/ent/user.go index 093f097a0..77757d1a7 100644 --- a/examples/o2obidi/ent/user.go +++ b/examples/o2obidi/ent/user.go @@ -104,14 +104,14 @@ func (u *User) assignValues(values ...interface{}) error { // QuerySpouse queries the spouse edge of the User. func (u *User) QuerySpouse() *UserQuery { - return (&UserClient{u.config}).QuerySpouse(u) + return (&UserClient{config: u.config}).QuerySpouse(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/o2orecur/ent/node.go b/examples/o2orecur/ent/node.go index a96e85b61..3ec699851 100644 --- a/examples/o2orecur/ent/node.go +++ b/examples/o2orecur/ent/node.go @@ -112,19 +112,19 @@ func (n *Node) assignValues(values ...interface{}) error { // QueryPrev queries the prev edge of the Node. func (n *Node) QueryPrev() *NodeQuery { - return (&NodeClient{n.config}).QueryPrev(n) + return (&NodeClient{config: n.config}).QueryPrev(n) } // QueryNext queries the next edge of the Node. func (n *Node) QueryNext() *NodeQuery { - return (&NodeClient{n.config}).QueryNext(n) + return (&NodeClient{config: n.config}).QueryNext(n) } // Update returns a builder for updating this Node. // Note that, you need to call Node.Unwrap() before calling this method, if this Node // was returned from a transaction, and the transaction was committed or rolled back. func (n *Node) Update() *NodeUpdateOne { - return (&NodeClient{n.config}).UpdateOne(n) + return (&NodeClient{config: n.config}).UpdateOne(n) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/start/ent/car.go b/examples/start/ent/car.go index 326075868..403942ec1 100644 --- a/examples/start/ent/car.go +++ b/examples/start/ent/car.go @@ -106,14 +106,14 @@ func (c *Car) assignValues(values ...interface{}) error { // QueryOwner queries the owner edge of the Car. func (c *Car) QueryOwner() *UserQuery { - return (&CarClient{c.config}).QueryOwner(c) + return (&CarClient{config: c.config}).QueryOwner(c) } // Update returns a builder for updating this Car. // Note that, you need to call Car.Unwrap() before calling this method, if this Car // was returned from a transaction, and the transaction was committed or rolled back. func (c *Car) Update() *CarUpdateOne { - return (&CarClient{c.config}).UpdateOne(c) + return (&CarClient{config: c.config}).UpdateOne(c) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/start/ent/group.go b/examples/start/ent/group.go index dfad6d57b..499e15427 100644 --- a/examples/start/ent/group.go +++ b/examples/start/ent/group.go @@ -74,14 +74,14 @@ func (gr *Group) assignValues(values ...interface{}) error { // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/start/ent/user.go b/examples/start/ent/user.go index 16ed32632..6d22980c5 100644 --- a/examples/start/ent/user.go +++ b/examples/start/ent/user.go @@ -93,19 +93,19 @@ func (u *User) assignValues(values ...interface{}) error { // QueryCars queries the cars edge of the User. func (u *User) QueryCars() *CarQuery { - return (&UserClient{u.config}).QueryCars(u) + return (&UserClient{config: u.config}).QueryCars(u) } // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/traversal/ent/group.go b/examples/traversal/ent/group.go index 2292d1837..2756789ed 100644 --- a/examples/traversal/ent/group.go +++ b/examples/traversal/ent/group.go @@ -108,19 +108,19 @@ func (gr *Group) assignValues(values ...interface{}) error { // QueryUsers queries the users edge of the Group. func (gr *Group) QueryUsers() *UserQuery { - return (&GroupClient{gr.config}).QueryUsers(gr) + return (&GroupClient{config: gr.config}).QueryUsers(gr) } // QueryAdmin queries the admin edge of the Group. func (gr *Group) QueryAdmin() *UserQuery { - return (&GroupClient{gr.config}).QueryAdmin(gr) + return (&GroupClient{config: gr.config}).QueryAdmin(gr) } // Update returns a builder for updating this Group. // Note that, you need to call Group.Unwrap() before calling this method, if this Group // was returned from a transaction, and the transaction was committed or rolled back. func (gr *Group) Update() *GroupUpdateOne { - return (&GroupClient{gr.config}).UpdateOne(gr) + return (&GroupClient{config: gr.config}).UpdateOne(gr) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/traversal/ent/pet.go b/examples/traversal/ent/pet.go index 25ac097f5..1608ae67d 100644 --- a/examples/traversal/ent/pet.go +++ b/examples/traversal/ent/pet.go @@ -108,19 +108,19 @@ func (pe *Pet) assignValues(values ...interface{}) error { // QueryFriends queries the friends edge of the Pet. func (pe *Pet) QueryFriends() *PetQuery { - return (&PetClient{pe.config}).QueryFriends(pe) + return (&PetClient{config: pe.config}).QueryFriends(pe) } // QueryOwner queries the owner edge of the Pet. func (pe *Pet) QueryOwner() *UserQuery { - return (&PetClient{pe.config}).QueryOwner(pe) + return (&PetClient{config: pe.config}).QueryOwner(pe) } // Update returns a builder for updating this Pet. // Note that, you need to call Pet.Unwrap() before calling this method, if this Pet // was returned from a transaction, and the transaction was committed or rolled back. func (pe *Pet) Update() *PetUpdateOne { - return (&PetClient{pe.config}).UpdateOne(pe) + return (&PetClient{config: pe.config}).UpdateOne(pe) } // Unwrap unwraps the entity that was returned from a transaction after it was closed, diff --git a/examples/traversal/ent/user.go b/examples/traversal/ent/user.go index 8959990ee..ef0f57687 100644 --- a/examples/traversal/ent/user.go +++ b/examples/traversal/ent/user.go @@ -115,29 +115,29 @@ func (u *User) assignValues(values ...interface{}) error { // QueryPets queries the pets edge of the User. func (u *User) QueryPets() *PetQuery { - return (&UserClient{u.config}).QueryPets(u) + return (&UserClient{config: u.config}).QueryPets(u) } // QueryFriends queries the friends edge of the User. func (u *User) QueryFriends() *UserQuery { - return (&UserClient{u.config}).QueryFriends(u) + return (&UserClient{config: u.config}).QueryFriends(u) } // QueryGroups queries the groups edge of the User. func (u *User) QueryGroups() *GroupQuery { - return (&UserClient{u.config}).QueryGroups(u) + return (&UserClient{config: u.config}).QueryGroups(u) } // QueryManage queries the manage edge of the User. func (u *User) QueryManage() *GroupQuery { - return (&UserClient{u.config}).QueryManage(u) + return (&UserClient{config: u.config}).QueryManage(u) } // Update returns a builder for updating this User. // Note that, you need to call User.Unwrap() before calling this method, if this User // was returned from a transaction, and the transaction was committed or rolled back. func (u *User) Update() *UserUpdateOne { - return (&UserClient{u.config}).UpdateOne(u) + return (&UserClient{config: u.config}).UpdateOne(u) } // Unwrap unwraps the entity that was returned from a transaction after it was closed,