lib/Yucca/Component/Mapping/Mapper.php
public function load(array $identifier, $propertyName, $shardingKey = null)
    {
        if (isset($identifier[$propertyName])) {
            return array($propertyName=>$identifier[$propertyName]);
        }

        $field = $this->getFieldNameFromProperty($propertyName);

        $sources = $this->getSourcesFromPropertyName($propertyName);

        foreach ($sources as $sourceName) {
            $source = $this->sourceManager->getSource($sourceName);
            if ($source->canHandle($field)) {
                $mappedIdentifiers = array();
                foreach ($identifier as $id => $value) {
                    $fieldName = $this->getFieldNameFromProperty($id);
                    if ($source->canHandle($fieldName)) {
                        $mappedIdentifiers[$fieldName] = $value;
                    }
                }

                $datas = $source->load($mappedIdentifiers, false, $shardingKey);

                $mappedDatas = $this->mapFieldsToProperties($datas, $sourceName);

                return $mappedDatas;
            }
        }

        throw new \Exception("No source support field $field from property $propertyName in {$this->name}");
    }
public function load(array $identifier, $propertyName, $shardingKey = null)
    {
        if (isset($identifier[$propertyName])) {
            return array($propertyName=>$identifier[$propertyName]);
        }

        $field = $this->getFieldNameFromProperty($propertyName);

        $sources = $this->getSourcesFromPropertyName($propertyName);

        foreach ($sources as $sourceName) {
            $source = $this->sourceManager->getSource($sourceName);
            if ($source->canHandle($field)) {
                $mappedIdentifiers = array();
                foreach ($identifier as $id => $value) {
                    $fieldName = $this->getFieldNameFromProperty($id);
                    if ($source->canHandle($fieldName)) {
                        $mappedIdentifiers[$fieldName] = $value;
                    }
                }

                $datas = $source->load($mappedIdentifiers, false, $shardingKey);

                $mappedDatas = $this->mapFieldsToProperties($datas, $sourceName);

                return $mappedDatas;
            }
        }

        throw new \Exception("No source support field $field from property $propertyName in {$this->name}");
    }
Load datas for specified propertyName and identifier

@param array  $identifier
@param string $propertyName
@param null   $shardingKey

@return array
@throws \Exception