public function validateReferences()
    {
        foreach ($this->referenceMappings as $fieldName) {
            $mapping = $this->mappings[$fieldName];
            if (!empty($mapping['targetDocument']) && !ClassLoader::classExists($mapping['targetDocument'])) {
                throw MappingException::invalidTargetDocumentClass($mapping['targetDocument'], $this->name, $mapping['fieldName']);
            }
        }
    }
public function validateReferences()
    {
        foreach ($this->referenceMappings as $fieldName) {
            $mapping = $this->mappings[$fieldName];
            if (!empty($mapping['targetDocument']) && !ClassLoader::classExists($mapping['targetDocument'])) {
                throw MappingException::invalidTargetDocumentClass($mapping['targetDocument'], $this->name, $mapping['fieldName']);
            }
        }
    }
public function validateReferences ( ) { foreach ( $ this -> referenceMappings as $ fieldName ) { $ mapping = $ this -> mappings [ $ fieldName ] ; if ( ! empty ( $ mapping [ 'targetDocument' ] ) && ! ClassLoader :: classExists ( $ mapping [ 'targetDocument' ] ) ) { throw MappingException :: invalidTargetDocumentClass ( $ mapping [ 'targetDocument' ] , $ this -> name , $ mapping [ 'fieldName' ] ) ; } } }
Validate association targets actually exist.

@throws MappingException if there is an invalid reference mapping
Validate association targets actually exist .