protected function getNonExistingFromRelation(string $relation): array
    {
        $nonExisting = [];

        foreach ($this->relationships[$relation] as $aggregate) {
            if (!$aggregate->exists()) {
                $nonExisting[] = $aggregate;
            }
        }

        return $nonExisting;
    }
protected function getNonExistingFromRelation(string $relation): array
    {
        $nonExisting = [];

        foreach ($this->relationships[$relation] as $aggregate) {
            if (!$aggregate->exists()) {
                $nonExisting[] = $aggregate;
            }
        }

        return $nonExisting;
    }
protected function getNonExistingFromRelation ( string $ relation ) : array { $ nonExisting = [ ] ; foreach ( $ this -> relationships [ $ relation ] as $ aggregate ) { if ( ! $ aggregate -> exists ( ) ) { $ nonExisting [ ] = $ aggregate ; } } return $ nonExisting ; }
Get non-existing related entities from a single relation.

@param string $relation

@return array
Get non - existing related entities from a single relation .