Skip to content
Browse files

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

  • Loading branch information...
1 parent d0c9d5b commit bbda52a44868905db33b5abe012835b9f0558e97 beberlei committed Feb 25, 2010
Showing with 11 additions and 3 deletions.
  1. +7 −0 UPGRADE_TO_2_0
  2. +2 −1 lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
  3. +2 −2 lib/Doctrine/ORM/Mapping/MappingException.php
View
7 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
View
3 lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
@@ -70,7 +70,8 @@ public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
}
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
4 lib/Doctrine/ORM/Mapping/MappingException.php
@@ -34,9 +34,9 @@ public static function identifierRequired($entityName)
. " 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()

0 comments on commit bbda52a

Please sign in to comment.
Something went wrong with that request. Please try again.