Skip to content

Commit

Permalink
doc: update schema-def to use proper method (ent#2416)
Browse files Browse the repository at this point in the history
The exemple incorrectly adds an ignored `User.Index` method, although ent actually needs a `User.Indexes` method as part of `ent.Interface`
  • Loading branch information
fgm authored and gitlawr committed Apr 13, 2022
1 parent eaa1661 commit c3ffdb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/md/schema-def.md
Expand Up @@ -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(),
Expand Down

0 comments on commit c3ffdb3

Please sign in to comment.