Skip to content

Commit

Permalink
fix: many2many relationship typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Jul 6, 2022
1 parent c0204ca commit 6b318c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/template/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (a {{$.QueryStructName}}{{$relationship}}{{$relation.Name}}) Model(m *{{$.S
relationTx = `
type {{$.QueryStructName}}{{$relationship}}{{$relation.Name}}Tx struct{ tx *gorm.Association }
func (a {{$.QueryStructName}}{{$relationship}}{{$relation.Name}}Tx) Find() (result {{if eq $relationship "HasMany" "Many2Many"}}[]{{end}}*{{$relation.Type}}, err error) {
func (a {{$.QueryStructName}}{{$relationship}}{{$relation.Name}}Tx) Find() (result {{if eq $relationship "HasMany" "ManyToMany"}}[]{{end}}*{{$relation.Type}}, err error) {
return result, a.tx.Find(&result)
}
Expand Down

0 comments on commit 6b318c4

Please sign in to comment.