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