Skip to content

Commit 11f030a

Browse files
committed
[DoctrineBridge] Removed legacy checks in DoctrineChoiceLoader
1 parent c0fd642 commit 11f030a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function loadValuesForChoices(array $choices, callable $value = null)
8787
$optimize = $this->idReader && (null === $value || \is_array($value) && $value[0] === $this->idReader);
8888

8989
// Attention: This optimization does not check choices for existence
90-
if ($optimize && !$this->choiceList && $this->idReader->isSingleId()) {
90+
if ($optimize && !$this->choiceList) {
9191
$values = [];
9292

9393
// Maintain order and indices of the given objects
@@ -123,7 +123,7 @@ public function loadChoicesForValues(array $values, callable $value = null)
123123
// a single-field identifier
124124
$optimize = $this->idReader && (null === $value || \is_array($value) && $this->idReader === $value[0]);
125125

126-
if ($optimize && !$this->choiceList && $this->objectLoader && $this->idReader->isSingleId()) {
126+
if ($optimize && !$this->choiceList && $this->objectLoader) {
127127
$unorderedObjects = $this->objectLoader->getEntitiesByIds($this->idReader->getIdField(), $values);
128128
$objectsById = [];
129129
$objects = [];

0 commit comments

Comments
 (0)