[2.0] DDC-376 - Fix in XML Mapping Driver 'inheritance-type' attribute.
This commit is contained in:
parent
d0c9d5b559
commit
bbda52a448
@ -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
|
||||
|
@ -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...>
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user