mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-09 05:48:20 +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;
|
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());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user