Skip to content

Commit 714502f

Browse files
author
esodin
committed
Issue: Parent is missing in the fields list that causes RoutingMissingException on flushing
1 parent d88d96b commit 714502f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

DependencyInjection/FOSElasticaExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,13 @@ private function loadObjectPersister(array $typeConfig, Reference $typeRef, Cont
391391
$arguments[] = array(new Reference($callbackId), 'serialize');
392392
} else {
393393
$abstractId = 'fos_elastica.object_persister';
394-
$arguments[] = $this->indexConfigs[$indexName]['types'][$typeName]['mapping']['properties'];
394+
$mapping = $this->indexConfigs[$indexName]['types'][$typeName]['mapping'];
395+
$argument = $mapping['properties'];
396+
if(isset($mapping['_parent'])){
397+
$argument['_parent'] = $mapping['_parent'];
398+
}
399+
$arguments[] = $argument;
400+
395401
}
396402

397403
$serviceId = sprintf('fos_elastica.object_persister.%s.%s', $indexName, $typeName);

0 commit comments

Comments
 (0)