entc/gen: schema config for edge schema (#4386)

This commit is contained in:
Jannik Clausen
2025-05-14 09:43:13 +02:00
committed by GitHub
parent b1786895ce
commit c382e911c3
27 changed files with 4189 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ type SchemaConfig struct {
{{ $n.Name }} string // {{ $n.Name }} table.
{{- range $e := $n.Edges }}
{{- /* Skip adding join-table in case the edge is inverse or already defined as an edge-schema. */}}
{{- if and $e.M2M (not $e.Inverse) (not $e.Through) }}
{{- if and $e.M2M (not $e.Inverse) }}
{{ $n.Name }}{{ $e.StructField }} string // {{ $n.Name }}-{{ $e.Name }}->{{ $e.Type.Name }} table.
{{- end }}
{{- end }}