From 53e0526dd49e791dc7fc5a0688367112246c08b0 Mon Sep 17 00:00:00 2001 From: aca Date: Sat, 18 Jan 2020 16:55:18 +0900 Subject: [PATCH] add json tag to edges --- entc/gen/template/ent.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entc/gen/template/ent.tmpl b/entc/gen/template/ent.tmpl index cd6d57d6c..bcda390e9 100644 --- a/entc/gen/template/ent.tmpl +++ b/entc/gen/template/ent.tmpl @@ -28,7 +28,7 @@ type {{ $.Name }} struct { // {{ $e.StructField }} holds the value of the {{ $e.Name }} edge. {{ $e.StructField }} {{ if not $e.Unique }}[]{{ end }}*{{ $e.Type.Name }} {{ with $e.StructTag }}`{{ . }}`{{ end }} {{- end }} - } + } `json:"edges,omitempty"` {{- end -}} {{- /* Additional fields to add by the storage driver. */}} {{- $tmpl := printf "dialect/%s/model/fields" $.Storage }}