private function addRelations(Repository $repo, MutableBag $relationQueue, Bag $importDatum, MutableBag $relationFields)
    {
        $classMeta = $repo->getClassMetadata();
        foreach ($relationFields as $fieldName) {
            $relationName = $classMeta->getBoltName() . '/' . $importDatum->get('slug');

            $existing = (array) $relationQueue->get($relationName);
            $relatedEntities = $importDatum->get($fieldName);

            if ($relatedEntities) {
                $relationQueue->set($relationName, array_merge($relatedEntities->toArray(), $existing));
            }
        }
    }
private function addRelations(Repository $repo, MutableBag $relationQueue, Bag $importDatum, MutableBag $relationFields)
    {
        $classMeta = $repo->getClassMetadata();
        foreach ($relationFields as $fieldName) {
            $relationName = $classMeta->getBoltName() . '/' . $importDatum->get('slug');

            $existing = (array) $relationQueue->get($relationName);
            $relatedEntities = $importDatum->get($fieldName);

            if ($relatedEntities) {
                $relationQueue->set($relationName, array_merge($relatedEntities->toArray(), $existing));
            }
        }
    }
private function addRelations ( Repository $ repo , MutableBag $ relationQueue , Bag $ importDatum , MutableBag $ relationFields ) { $ classMeta = $ repo -> getClassMetadata ( ) ; foreach ( $ relationFields as $ fieldName ) { $ relationName = $ classMeta -> getBoltName ( ) . '/' . $ importDatum -> get ( 'slug' ) ; $ existing = ( array ) $ relationQueue -> get ( $ relationName ) ; $ relatedEntities = $ importDatum -> get ( $ fieldName ) ; if ( $ relatedEntities ) { $ relationQueue -> set ( $ relationName , array_merge ( $ relatedEntities -> toArray ( ) , $ existing ) ) ; } } }
Queue an entities relations for later processing.

@param Repository $repo
@param MutableBag $relationQueue
@param Bag        $importDatum
@param MutableBag $relationFields
Queue an entities relations for later processing .