From d86aa26f43453b010cc770279221c0232ad9abdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Mon, 29 Nov 2021 14:39:55 +0100 Subject: [PATCH] IBX-1564: Fixed undefined policies loading order (#267) --- .../Legacy/User/Role/Gateway/DoctrineDatabase.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eZ/Publish/Core/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/eZ/Publish/Core/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index 179774ad19..bd9c3e4116 100644 --- a/eZ/Publish/Core/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/eZ/Publish/Core/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();