entc/gen: Fix import for ID type (#455)

* entc/gen: Alias semantic version imports

* entc/gen: Add import for ID type

* entc/gen: Revert semantic version import aliasing
This commit is contained in:
Hylke Visser
2020-05-01 10:27:18 +02:00
committed by GitHub
parent 3fa749d9e3
commit cef1058af0
2 changed files with 5 additions and 2 deletions

View File

@@ -946,7 +946,7 @@ func templateHookTmpl() (*asset, error) {
return a, nil
}
var _templateImportTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x53\xdd\x4a\xe4\x4c\x10\xbd\x9e\x3c\xc5\x21\xcc\x85\x0a\x76\xfc\xbc\xfb\x04\x2f\x44\x14\x84\x65\x11\xf4\x05\x7a\xba\x2b\x49\x61\xa6\x3b\x5b\x5d\xe3\xae\x84\x7e\xf7\x25\x9d\xcc\xaa\xc8\xb2\x57\x73\xa6\x4f\xfd\x9c\xaa\x3a\x99\xa6\xe6\xac\xba\x8d\xe3\x9b\x70\xd7\x2b\x2e\x2f\xfe\xfb\xff\x7c\x14\x4a\x14\x14\xf7\xd6\xd1\x2e\xc6\x17\x3c\x04\x67\x70\x33\x0c\x28\x41\x09\x33\x2f\xaf\xe4\x4d\xf5\xdc\x73\x42\x8a\x07\x71\x04\x17\x3d\x81\x13\x06\x76\x14\x12\x79\x1c\x82\x27\x81\xf6\x84\x9b\xd1\xba\x9e\x70\x69\x2e\x8e\x2c\xda\x78\x08\xbe\xe2\x50\xf8\x6f\x0f\xb7\x77\xdf\x9f\xee\xd0\xf2\x40\x58\xdf\x24\x46\x85\x67\x21\xa7\x51\xde\x10\x5b\xe8\x87\x66\x2a\x44\xa6\x3a\x6b\x72\xae\xaa\x69\x82\xa7\x96\x03\xa1\xe6\xfd\x18\x45\x6b\xe4\x5c\x2d\x10\x27\xd5\xa6\x6e\xf7\x5a\x57\x9b\xda\xc5\xa0\xf4\xab\x40\x12\x89\x92\x66\xb4\xb7\xda\xcf\xbf\x49\x85\x43\x57\x9e\x94\xf7\x54\x57\x9b\x69\x3a\x47\x73\x06\xee\x42\x14\x42\x47\x81\x44\x39\x74\x88\x01\x9d\xd8\xb1\x47\x1a\xc9\x71\xcb\xad\x83\xd2\x7e\x1c\xac\x52\x42\x51\x54\x52\xb9\x45\x88\x8a\x13\xfa\x81\xad\xb9\x8d\xa1\xe5\xce\x3c\x5a\xf7\x62\x3b\xc2\xf6\x88\x4e\x67\xa5\x9b\x4d\x3d\x4d\x5f\x83\x72\x6e\x46\x21\xcf\xce\xea\x2c\xa7\x14\x15\x1b\xe6\xf4\x16\x57\xd7\xd8\x9a\x7b\xa6\xc1\xa7\xa5\x44\xa1\x7f\xb2\xf6\xd8\xb6\xe6\xf9\x6d\x24\xf3\xf8\xd2\x3d\x5a\xed\x57\xba\xf4\x30\xc8\xb9\x3e\x06\x53\xf0\x0b\xf7\xf1\xcf\x47\x5c\x77\xac\xfd\x61\x67\x5c\xdc\x37\xed\xea\x05\x0e\xee\xb0\xb3\x1a\xa5\xa1\x50\x36\xf9\xaf\x98\xc6\xb3\x1d\xc8\xe9\xba\xd0\x45\xa1\x79\xd2\x28\xcb\x8c\x9f\x07\x5b\x8f\x76\x75\x0d\xf3\x50\xe0\x71\xba\xb2\xa1\x95\x5d\x66\xf8\x9b\xea\x69\xfa\x73\x8e\xa3\x1f\x52\x63\xbd\x67\xe5\x18\xec\x50\x63\x3b\x87\x9d\xce\xae\x59\x53\xaa\xf9\x23\xc0\xcd\x7b\x9a\xf6\x56\xe1\x6c\xc0\x8e\x10\x5f\x49\x84\x3d\xf9\xd9\x97\x51\x8a\xa3\x23\xac\xf7\x78\xaf\x89\xb5\xcd\xcc\x8c\xcb\xf5\x92\x29\x4e\xf8\x62\xcd\xcf\x52\x72\x9e\x26\x0a\x3e\xe7\xea\x77\x00\x00\x00\xff\xff\x22\x7f\xe2\x89\x88\x03\x00\x00")
var _templateImportTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x53\xc1\x6a\xdc\x30\x10\x3d\xaf\xbf\xe2\x61\xf6\x90\x04\x22\xa7\xb9\x35\x90\x43\x48\x13\x58\x28\x25\x90\xfc\x80\x56\x1a\xdb\x43\xbc\x92\x3b\x9a\x4d\x1b\x8c\xff\xbd\x58\x6b\x37\x59\xb6\xd0\x93\x9f\xf5\x66\xde\x8c\x66\x9e\x86\xa1\xba\x28\xee\x63\xff\x2e\xdc\xb4\x8a\xeb\xab\x2f\x5f\x2f\x7b\xa1\x44\x41\xf1\x68\x1d\x6d\x63\x7c\xc5\x26\x38\x83\xbb\xae\x43\x0e\x4a\x98\x78\x79\x23\x6f\x8a\x97\x96\x13\x52\xdc\x8b\x23\xb8\xe8\x09\x9c\xd0\xb1\xa3\x90\xc8\x63\x1f\x3c\x09\xb4\x25\xdc\xf5\xd6\xb5\x84\x6b\x73\xb5\xb0\xa8\xe3\x3e\xf8\x82\x43\xe6\xbf\x6f\xee\x1f\x7e\x3c\x3f\xa0\xe6\x8e\x30\x9f\x49\x8c\x0a\xcf\x42\x4e\xa3\xbc\x23\xd6\xd0\x4f\xc5\x54\x88\x4c\x71\x51\x8d\x63\x51\x0c\x03\x3c\xd5\x1c\x08\x25\xef\xfa\x28\x5a\x62\x1c\x8b\x03\xc4\x59\xb1\x2a\xeb\x9d\x96\xc5\xaa\x74\x31\x28\xfd\xce\x90\x44\xa2\xa4\x09\xed\xac\xb6\xd3\x37\xa9\x70\x68\xf2\x91\xf2\x8e\xca\x62\x35\x0c\x97\xa8\x2e\xc0\x4d\x88\x42\x68\x28\x90\x28\x87\x06\x31\xa0\x11\xdb\xb7\x48\x3d\x39\xae\xb9\x76\x50\xda\xf5\x9d\x55\x4a\xc8\x1d\xe5\x54\xae\x11\xa2\xe2\x8c\x7e\x62\x6d\xee\x63\xa8\xb9\x31\x4f\xd6\xbd\xda\x86\xb0\x5e\xd0\xf9\xd4\xe9\x6a\x55\x0e\xc3\x69\xd0\x38\x56\xbd\x90\x67\x67\x75\x6a\x27\x8b\xfe\x62\x6d\xb1\x36\x9b\x6f\xe6\xe5\xbd\x27\xf3\xf4\xda\x3c\x59\x6d\x0f\x22\x59\xc5\x60\x1c\x97\x60\x0a\xfe\xc0\x4c\x3f\x62\xc3\x54\xb8\xc6\xcd\x2d\xd6\xe6\x91\xa9\xf3\x69\xce\xfb\x10\xae\xff\x25\x7b\xa4\x7b\x2a\xbc\xfc\x7c\xc6\x65\xc3\xda\xee\xb7\xc6\xc5\x5d\x55\xcf\x2e\xe2\xe0\xf6\x5b\xab\x51\x2a\x0a\x79\x07\xff\x8b\xa9\x3c\xdb\x8e\x9c\xce\xab\x98\xaf\xfe\xac\x51\x0e\xd3\x39\xbe\xd8\xbc\xee\x9b\x5b\x98\x4d\x86\xe9\xd3\x54\x16\xf6\x74\x36\xc7\xf8\xef\x22\x17\x27\xa5\xca\x7a\xcf\xca\x31\xd8\xae\xc4\x7a\x0a\x3b\x9f\xfc\x36\xa7\x14\xd3\xf3\xc1\xdd\x47\x9a\xb6\x56\xe1\x6c\xc0\x96\x10\xdf\x48\x84\x3d\xf9\xc9\xd1\x51\xf2\x5b\x88\xb0\xde\xe3\x43\x13\x73\x99\x89\xe9\x0f\x7b\x4f\x26\x7b\xe8\xc4\xd4\xc7\xad\x8c\xe3\x30\x50\xf0\xe3\x58\xfc\x09\x00\x00\xff\xff\x98\xf7\x00\x1d\xc2\x03\x00\x00")
func templateImportTmplBytes() ([]byte, error) {
return bindataRead(
@@ -961,7 +961,7 @@ func templateImportTmpl() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "template/import.tmpl", size: 904, mode: os.FileMode(420), modTime: time.Unix(1, 0)}
info := bindataFileInfo{name: "template/import.tmpl", size: 962, mode: os.FileMode(420), modTime: time.Unix(1, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}

View File

@@ -15,6 +15,9 @@ import (
{{- /* ignore generting on graph specififc templates */}}
{{- if not (eq $.Config.Package $.Package) }}
"{{ $.Config.Package }}/predicate"
{{- with $.ID.Type.PkgPath }}
"{{ . }}"
{{- end }}
{{- range $f := $.Fields }}
{{- with $f.Type.PkgPath }}
"{{ . }}"