diff --git a/UPGRADE_TO_2_0 b/UPGRADE_TO_2_0 index b60592db4..eb07afa37 100644 --- a/UPGRADE_TO_2_0 +++ b/UPGRADE_TO_2_0 @@ -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 diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 54087880a..a9f985661 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -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 diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index 24610651e..270f22f81 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -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()