1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

DDC-770 - Commit missing changes to XmlDriver and YamlDriver

This commit is contained in:
Benjamin Eberlei 2010-08-27 22:21:18 +02:00
parent 187d9289ad
commit 43f8398fbb
2 changed files with 0 additions and 8 deletions

View file

@ -87,8 +87,6 @@ class XmlDriver extends AbstractFileDriver
'type' => (string)$discrColumn['type'], 'type' => (string)$discrColumn['type'],
'length' => (string)$discrColumn['length'] 'length' => (string)$discrColumn['length']
)); ));
} else {
throw MappingException::missingDiscriminatorColumn($className);
} }
// Evaluate <discriminator-map...> // Evaluate <discriminator-map...>
@ -98,8 +96,6 @@ class XmlDriver extends AbstractFileDriver
$map[(string)$discrMapElement['value']] = (string)$discrMapElement['class']; $map[(string)$discrMapElement['value']] = (string)$discrMapElement['class'];
} }
$metadata->setDiscriminatorMap($map); $metadata->setDiscriminatorMap($map);
} else {
throw MappingException::missingDiscriminatorMap($className);
} }
} }
} }

View file

@ -79,15 +79,11 @@ class YamlDriver extends AbstractFileDriver
'type' => $discrColumn['type'], 'type' => $discrColumn['type'],
'length' => $discrColumn['length'] 'length' => $discrColumn['length']
)); ));
} else {
throw MappingException::missingDiscriminatorColumn($className);
} }
// Evaluate discriminatorMap // Evaluate discriminatorMap
if (isset($element['discriminatorMap'])) { if (isset($element['discriminatorMap'])) {
$metadata->setDiscriminatorMap($element['discriminatorMap']); $metadata->setDiscriminatorMap($element['discriminatorMap']);
} else {
throw MappingException::missingDiscriminatorMap($className);
} }
} }
} }