mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: schema config for edge schema (#4386)
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user