From 6deb724198718ecec349ec53c74b03988b4fc165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20G=2E=20MARAND?= Date: Sun, 20 Mar 2022 10:46:06 +0100 Subject: [PATCH] doc: update schema-def to use proper method (#2416) The exemple incorrectly adds an ignored `User.Index` method, although ent actually needs a `User.Indexes` method as part of `ent.Interface` --- doc/md/schema-def.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/md/schema-def.md b/doc/md/schema-def.md index f582f2be48..3e281c70d7 100755 --- a/doc/md/schema-def.md +++ b/doc/md/schema-def.md @@ -43,7 +43,7 @@ func (User) Edges() []ent.Edge { } } -func (User) Index() []ent.Index { +func (User) Indexes() []ent.Index { return []ent.Index{ index.Fields("age", "name"). Unique(),