protected function doLoadValuesForChoices(array
$choices): array
{ // Optimize performance for single-field identifiers. We already
// know that the IDs are used as values
// Attention: This optimization does not check choices for existence
if ($this->idReader
) { throw new LogicException('Not defining the IdReader explicitly as a value callback when the query can be optimized is not supported.'
);
} return parent::
doLoadValuesForChoices($choices);
} protected function doLoadChoicesForValues(array
$values, ?callable
$value): array
{ if ($this->idReader && null ===
$value) { throw new LogicException('Not defining the IdReader explicitly as a value callback when the query can be optimized is not supported.'
);
} $idReader = null;
if (\
is_array($value) &&
$value[0
] instanceof IdReader
) { $idReader =
$value[0
];
}