From deb368933fed9f70a478e5a50cc9a17cbddbc11e Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Wed, 9 Dec 2020 17:31:24 +0200 Subject: [PATCH] entc/gen: add withFKs to reserved fields --- entc/gen/type.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entc/gen/type.go b/entc/gen/type.go index 3a155e727..9e9fd1930 100644 --- a/entc/gen/type.go +++ b/entc/gen/type.go @@ -763,7 +763,9 @@ func (f Field) EnumName(enum string) string { } // Validator returns the validator name. -func (f Field) Validator() string { return pascal(f.Name) + "Validator" } +func (f Field) Validator() string { + return pascal(f.Name) + "Validator" +} // EntSQL returns the EntSQL annotation if exists. func (f Field) EntSQL() *entsql.Annotation { @@ -1334,6 +1336,7 @@ var ( "predicates", "typ", "unique", + "withFKs", ) )