mapManyEmbedded() public method

Map a collection of embedded documents.
public mapManyEmbedded ( array $mapping )
$mapping array The mapping information.
 function it_configures_the_mappings_of_an_original_model_that_is_override($configuration)
 {
     $metadataInfo = new ClassMetadataInfo('Foo\\Bar\\OriginalQux');
     $metadataInfo->mapOneReference(['fieldName' => 'relation1', 'targetEntity' => 'Foo']);
     $metadataInfo->mapManyReference(['fieldName' => 'relation2', 'targetEntity' => 'Foo']);
     $metadataInfo->mapOneEmbedded(['fieldName' => 'relation3', 'targetEntity' => 'Foo', 'mappedBy' => 'baz']);
     $metadataInfo->mapManyEmbedded(['fieldName' => 'relation4', 'targetEntity' => 'Foo']);
     $overrides = [['original' => 'Foo\\Bar\\OriginalQux', 'override' => 'Acme\\Bar\\OverrideQux'], ['original' => 'Foo\\Baz\\OriginalQux', 'override' => 'Acme\\Baz\\OverrideQux']];
     $this->configure($metadataInfo, $overrides, $configuration)->shouldBeAnOverrideModel();
 }
 /**
  * @expectedException \Doctrine\ODM\MongoDB\Mapping\MappingException
  * @expectedExceptionMessage No multikey indexes are allowed in the shard key
  */
 public function testNoReferenceManyInShardKey()
 {
     $cm = new ClassMetadataInfo('stdClass');
     $cm->mapManyEmbedded(['fieldName' => 'referenceMany']);
     $cm->setShardKey(array('referenceMany' => 1));
 }