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 b6e939c commit 64e90e2
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[j].Table)
return (len(mappedRelations[i].Table) + len(mappedRelations[i].Tag)) < (len(mappedRelations[j].Table) + len(mappedRelations[j].Tag))
})

return
Expand Down

0 comments on commit 64e90e2

Please sign in to comment.