Gets the cache driver implementation that is used for the mapping metadata.
public getMetadataDriverImpl ( ) : Doctrine\ODM\MongoDB\Mapping\Driver\Driver | ||
return | Doctrine\ODM\MongoDB\Mapping\Driver\Driver |
/** * Set the association mappings of a metadata. * * @param ClassMetadataInfo $metadata * @param Configuration $configuration */ protected function setAssociationMappings(ClassMetadataInfo $metadata, Configuration $configuration) { $supportedClasses = $configuration->getMetadataDriverImpl()->getAllClassNames(); foreach (class_parents($metadata->getName()) as $parent) { if (in_array($parent, $supportedClasses)) { $parentMetadata = new MongoClassMetadata($parent); $configuration->getMetadataDriverImpl()->loadMetadataForClass($parent, $parentMetadata); foreach ($parentMetadata->associationMappings as $key => $value) { if ($this->hasRelation($value['association'])) { $metadata->associationMappings[$key] = $value; } } } } }