|
5 | 5 | namespace Doctrine\ORM\Cache\Persister\Entity; |
6 | 6 |
|
7 | 7 | use Doctrine\Common\Collections\Criteria; |
| 8 | +use Doctrine\Common\Collections\Order; |
8 | 9 | use Doctrine\DBAL\LockMode; |
9 | 10 | use Doctrine\ORM\Cache; |
10 | 11 | use Doctrine\ORM\Cache\CollectionCacheKey; |
|
17 | 18 | use Doctrine\ORM\Cache\TimestampCacheKey; |
18 | 19 | use Doctrine\ORM\Cache\TimestampRegion; |
19 | 20 | use Doctrine\ORM\EntityManagerInterface; |
20 | | -use Doctrine\ORM\Internal\CriteriaOrderings; |
21 | 21 | use Doctrine\ORM\Mapping\AssociationMapping; |
22 | 22 | use Doctrine\ORM\Mapping\ClassMetadata; |
23 | 23 | use Doctrine\ORM\Mapping\ClassMetadataFactory; |
|
34 | 34 |
|
35 | 35 | abstract class AbstractEntityPersister implements CachedEntityPersister |
36 | 36 | { |
37 | | - use CriteriaOrderings; |
38 | | - |
39 | 37 | protected UnitOfWork $uow; |
40 | 38 | protected ClassMetadataFactory $metadataFactory; |
41 | 39 |
|
@@ -204,8 +202,8 @@ private function storeJoinedAssociations(object $entity): void |
204 | 202 | /** |
205 | 203 | * Generates a string of currently query |
206 | 204 | * |
207 | | - * @param string[]|Criteria $criteria |
208 | | - * @param string[]|null $orderBy |
| 205 | + * @param string[]|Criteria $criteria |
| 206 | + * @param array<string, Order>|null $orderBy |
209 | 207 | */ |
210 | 208 | protected function getHash( |
211 | 209 | string $query, |
@@ -429,7 +427,7 @@ public function count(array|Criteria $criteria = []): int |
429 | 427 | */ |
430 | 428 | public function loadCriteria(Criteria $criteria): array |
431 | 429 | { |
432 | | - $orderBy = self::getCriteriaOrderings($criteria); |
| 430 | + $orderBy = $criteria->orderings(); |
433 | 431 | $limit = $criteria->getMaxResults(); |
434 | 432 | $offset = $criteria->getFirstResult(); |
435 | 433 | $query = $this->persister->getSelectSQL($criteria); |
|
0 commit comments