From 620c6a8f943e4fd052c2775ebfe4e87e2f6e582c Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Sun, 3 Apr 2022 00:31:30 +0700 Subject: [PATCH] Update entc/gen/type.go Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com> --- entc/gen/type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entc/gen/type.go b/entc/gen/type.go index 1f2b521bf7..2ac5461abd 100644 --- a/entc/gen/type.go +++ b/entc/gen/type.go @@ -240,7 +240,7 @@ func NewType(c *Config, schema *load.Schema) (*Type, error) { // User defined id field. if tf.Name == typ.ID.Name { if tf.Optional { - return nil, fmt.Errorf("id field must not be optional") + return nil, fmt.Errorf("id field cannot be optional") } typ.ID = tf } else {