- Issue created by @lars.stiebenz
- last update
over 1 year ago 45 pass - @larsstiebenz opened merge request.
- Status changed to Needs review
over 1 year ago 11:24am 11 August 2023 - last update
over 1 year ago 45 pass My approach is basically the same as #3380653-2: Entity queries need an explicit accessCheck()-call in Drupal 10 → : The accessChecks are all set to FALSE since all the queries are used either on admin pages or in background processes.
Additionally I removed some queries entirely. At several places the query was used to get the IDs of all entities (mostly server configurations) and the result was only used as a parameter for loadMultiple(). Since loadMultiple() without a parameter loads all entities too, the query before should be unnecessary.
Or in code:
Old:$servers = $storage->getQuery()->execute(); foreach ($storage->loadMultiple($servers) as $server) { // ... }
New:
foreach ($storage->loadMultiple() as $server) { // ... }
"New" should give the same result as "Old" but with 1 query less.
- First commit to issue fork.
- @bluegeek9 opened merge request.
-
bluegeek9 →
committed f3929e9f on 8.x-4.x
Issue #3380653 by lars.stiebenz: Entity queries need an explicit...
-
bluegeek9 →
committed f3929e9f on 8.x-4.x
- Status changed to Fixed
over 1 year ago 4:41pm 3 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.