Skip to content

Commit 0e5373f

Browse files
committed
fix: entropy for the comparison
1 parent 64e90e2 commit 0e5373f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/generator/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func BuildRelationFields(table objects.Table, relations []state.Relation) (mappe
354354
}
355355

356356
sort.Slice(mappedRelations, func(i, j int) bool {
357-
return (len(mappedRelations[i].Table) + len(mappedRelations[i].Tag)) < (len(mappedRelations[j].Table) + len(mappedRelations[j].Tag))
357+
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))
358358
})
359359

360360
return

0 commit comments

Comments
 (0)