protected function getRelatedAggregateFromHash(string $hash, string $relation)
    {
        foreach ($this->relationships[$relation] as $aggregate) {
            if ($aggregate->getEntityHash() == $hash) {
                return $aggregate;
            }
        }
    }
protected function getRelatedAggregateFromHash(string $hash, string $relation)
    {
        foreach ($this->relationships[$relation] as $aggregate) {
            if ($aggregate->getEntityHash() == $hash) {
                return $aggregate;
            }
        }
    }
protected function getRelatedAggregateFromHash ( string $ hash , string $ relation ) { foreach ( $ this -> relationships [ $ relation ] as $ aggregate ) { if ( $ aggregate -> getEntityHash ( ) == $ hash ) { return $ aggregate ; } } }
Get related aggregate from its hash.

@param string $hash
@param string $relation

@return \Analogue\ORM\System\Aggregate|null
Get related aggregate from its hash .