File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ This file tracks the changes to Wing over time. Especially
4
4
with respect to new features and compatibility changes.
5
5
==========================================================
6
6
7
+ 2024-08-01
8
+ * Guarantee that rows are always returned in a consistent order.
9
+
7
10
2024-04-29
8
11
* Modernize the install to latest Perl and fix a bunch of perl prereq problems.
9
12
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ sub format_list {
137
137
# ordering
138
138
if (exists $options {order_by } && $options {order_by }) {
139
139
my $order_by = $options {order_by };
140
+ my $has_id = 0;
140
141
if (ref $order_by ne ' ARRAY' ) {
141
142
$order_by = [$order_by ];
142
143
}
@@ -147,6 +148,10 @@ sub format_list {
147
148
next ;
148
149
}
149
150
151
+ if ($order_by -> [$i ] eq ' id' || $order_by -> [$i ] eq ' me.id' ) {
152
+ $has_id = 1;
153
+ }
154
+
150
155
if ($order_by -> [$i ] !~ m /\. / ) {
151
156
$order_by -> [$i ] = ' me.' .$order_by -> [$i ];
152
157
}
@@ -158,6 +163,9 @@ sub format_list {
158
163
}
159
164
}
160
165
}
166
+ if (! $has_id ) {
167
+ push @{ $order_by }, ' me.id' ;
168
+ }
161
169
$extra -> {order_by } = $order_by ;
162
170
}
163
171
if (exists $extra -> {order_by } && $extra -> {order_by } && exists $options {sort_order } && defined $options {sort_order } && $options {sort_order } eq ' desc' ) {
You can’t perform that action at this time.
0 commit comments