Skip to content

Commit

Permalink
Update entc/gen/type.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
  • Loading branch information
giautm and a8m committed Apr 2, 2022
1 parent 0444141 commit 620c6a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entc/gen/type.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 620c6a8

Please sign in to comment.