diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index 248a50d319..3d57da7e0b 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -150,7 +150,8 @@ public function loadRole(int $roleId, int $status = Role::STATUS_DEFINED): array ) ->andWhere( $this->buildRoleDraftQueryConstraint($status, $query) - ); + ) + ->orderBy('p.id', 'ASC'); return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); } @@ -169,7 +170,8 @@ public function loadRoleByIdentifier( ) ->andWhere( $this->buildRoleDraftQueryConstraint($status, $query) - ); + ) + ->orderBy('p.id', 'ASC'); $statement = $query->execute(); @@ -186,7 +188,8 @@ public function loadRoleDraftByRoleId(int $roleId): array 'r.version', $query->createPositionalParameter($roleId, ParameterType::STRING) ) - ); + ) + ->orderBy('p.id', 'ASC'); $statement = $query->execute();