Skip to content

Commit 6b71f18

Browse files
author
NarrowsProjects
committed
feat: upgrade querybuilder with automatic ID sorting
1 parent 0e4f0dd commit 6b71f18

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/database/utilities/QueryBuilder.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ class QueryBuilder {
629629

630630
if (!this._selectOnly && !hasExplicitColumns) {
631631
options.attributes = { include: options.attributes };
632+
} else {
633+
this.orderBy('id', 'asc'); // Array syntax is inconsistent with its sorting unless explicitly defined
632634
}
633635

634636
return options;

0 commit comments

Comments
 (0)