entc/gen: support type-based matching for edge-schema columns (#3306)

In case of no match by foreign-keys, we search by edge-type. This can happen if the type (edge owner)
is named T, but the edge-schema E names its edge field as u_id. We consider it as a match if
there is only one usage of T in E.
This commit is contained in:
Ariel Mashraki
2023-02-07 10:58:20 +02:00
committed by GitHub
parent 939c7cff1a
commit baec350ed4
38 changed files with 9050 additions and 62 deletions

View File

@@ -8,8 +8,8 @@ linters-settings:
dupl:
threshold: 100
funlen:
lines: 120
statements: 120
lines: 140
statements: 140
goheader:
template: |-
Copyright 2019-present Facebook Inc. All rights reserved.