mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-08-06 12:11:13 +00:00
Changed default sorting to prioritize non-nullable fields
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user