mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-08 21:38:21 +00:00
Changed default sorting to prioritize non-nullable fields
This commit is contained in:
parent
90da830030
commit
1db41bad38
@ -209,6 +209,12 @@ public class DbObjectSchema {
|
||||
return -1;
|
||||
if (b.isPrimaryKey() && !a.isPrimaryKey())
|
||||
return 1;
|
||||
|
||||
if (!a.isNullable() && b.isNullable())
|
||||
return -1;
|
||||
if (a.isNullable() && !b.isNullable())
|
||||
return 1;
|
||||
|
||||
return a.getName().compareTo(b.getName());
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user