Skip to content

Commit

Permalink
fix: entropy for the comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Sep 8, 2024
1 parent 64e90e2 commit 0e5373f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/generator/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func BuildRelationFields(table objects.Table, relations []state.Relation) (mappe
}

sort.Slice(mappedRelations, func(i, j int) bool {
return (len(mappedRelations[i].Table) + len(mappedRelations[i].Tag)) < (len(mappedRelations[j].Table) + len(mappedRelations[j].Tag))
return (len(mappedRelations[i].Table) + len(mappedRelations[i].Type) + len(mappedRelations[i].Tag)) < (len(mappedRelations[j].Table) + len(mappedRelations[j].Type) + len(mappedRelations[j].Tag))
})

return
Expand Down

0 comments on commit 0e5373f

Please sign in to comment.