Skip to content

Commit 3e5948c

Browse files
committed
Domain sync
1 parent 55da74a commit 3e5948c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

src/main/java/io/fusionauth/domain/GroupMember.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2022, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-2024, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,10 @@ public class GroupMember implements Buildable<GroupMember> {
3838

3939
public ZonedDateTime insertInstant;
4040

41+
/**
42+
* Deprecated since 1.52.0 (Aug 2024). Planned removal by end of 2024
43+
*/
44+
@Deprecated
4145
public User user;
4246

4347
public UUID userId;

src/main/java/io/fusionauth/domain/search/GroupMemberSearchCriteria.java

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
/*
2-
* Copyright (c) 2022, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2022-2024, FusionAuth, All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing,
11+
* software distributed under the License is distributed on an
12+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
* either express or implied. See the License for the specific
14+
* language governing permissions and limitations under the License.
315
*/
416
package io.fusionauth.domain.search;
517

@@ -41,11 +53,14 @@ public Set<String> supportedOrderByColumns() {
4153

4254
@Override
4355
protected String defaultOrderBy() {
44-
return "insertInstant ASC";
56+
// All memberships for a given group share an insertInstant because they are recreated each time
57+
// Add userId to provide consistent ordering within a group. The groupId ordering ensures consistency
58+
// for a single user's memberships across multiple groups if they happen to have the same insertInstant.
59+
return "insertInstant ASC, userId ASC, groupId ASC";
4560
}
4661

4762
static {
48-
SortableFields.put("id", "id");
63+
SortableFields.put("id", "gm.id");
4964
SortableFields.put("insertInstant", "gm.insert_instant");
5065
SortableFields.put("groupId", "gm.groups_id");
5166
SortableFields.put("tenantId", "g.tenants_id");

0 commit comments

Comments
 (0)