1
0
mirror of synced 2024-12-12 22:36:02 +03:00

[2.0] DDC-376 - Fix in XML Mapping Driver 'inheritance-type' attribute.

This commit is contained in:
beberlei 2010-02-25 21:16:05 +00:00
parent d0c9d5b559
commit bbda52a448
3 changed files with 11 additions and 3 deletions

View File

@ -12,6 +12,13 @@ be implemented by using the @columnDefinition annotation (or the approriate XML
Additionally keep in mind that Doctrine's focus in on objects and you can specifiy default values for an Entitiy's
mapped fields inside PHP easily. Upon persist() invocation these values are saved as if they were default values.
## Partial Objects
## XML Mapping Driver
The 'inheritance-type' attribute changed to take last bit of ClassMetadata constant names, i.e.
NONE, SINGLE_TABLE, INHERITANCE_TYPE_JOINED
# Upgrade from 2.0-ALPHA3 to 2.0-ALPHA4
## CLI Controller changes

View File

@ -70,7 +70,8 @@ class XmlDriver extends AbstractFileDriver
}
if (isset($xmlRoot['inheritance-type'])) {
$metadata->setInheritanceType((string)$xmlRoot['inheritance-type']);
$inheritanceType = (string)$xmlRoot['inheritance-type'];
$metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType));
}
// Evaluate <discriminator-column...>

View File

@ -34,9 +34,9 @@ class MappingException extends \Doctrine\ORM\ORMException
. " Every Entity must have an identifier/primary key.");
}
public static function invalidInheritanceType($type)
public static function invalidInheritanceType($entityName, $type)
{
return new self("The inheritance type '$type' does not exist.");
return new self("The inheritance type '$type' specified for '$entityName' does not exist.");
}
public static function generatorNotAllowedWithCompositeId()