Skip to content

Commit

Permalink
fix: avoid exact relation tag being redeclared
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Sep 8, 2024
1 parent 92180c2 commit b6e939c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/generator/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package generator
import (
"fmt"
"path/filepath"
"reflect"
"sort"
"strings"
"text/template"
Expand Down Expand Up @@ -255,7 +254,7 @@ func buildColumnTag(c objects.Column, mapPk map[string]bool, validationTags stat

func containsRelation(relations []state.Relation, r state.Relation) bool {
for _, rel := range relations {
if reflect.DeepEqual(rel, r) {
if rel.Tag == r.Tag {
return true
}
}
Expand Down

0 comments on commit b6e939c

Please sign in to comment.