public function transform(&$results)
{
$localKeyName = $this->_relation->getLocalKey();
$localKeys = FluentArray::from($results)->map(Functions::extractField($localKeyName))->filterNotBlank()->unique()->toArray();
$relationObjectsById = $localKeys ? $this->_loadRelationObjectsIndexedById($localKeys) : array();
foreach ($results as $result) {
$values = $this->_findRelationObject($relationObjectsById, $result->{$localKeyName});
$destinationField = $this->_relation->getName();
$result->{$destinationField} = $this->_relation->extractValue($values);
}
}