Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,9 @@ public List<SQLForeignKey> getForeignKeys(String catName, String parent_db_name,
if (queryText.endsWith("AND")) {
queryText = queryText.substring(0, queryText.length()-3);
}
queryText += """
ORDER BY %1$s."CONSTRAINT_NAME" ASC, %1$s."POSITION ASC"
""".formatted(KEY_CONSTRAINTS);
List<String> pms = new ArrayList<String>();
pms.add(catName);
if (foreign_db_name != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11618,6 +11618,7 @@ private List<SQLForeignKey> getForeignKeysViaJdo(String catName, String parentDb
if (foreignDbName != null) {
params.add(foreignDbName);
}
query.setOrdering("constraintName ascending, position ascending");
constraints = (Collection<?>) query.executeWithArray(params.toArray(new String[0]));

pm.retrieveAll(constraints);
Expand Down