From 797fb9c34a2e23d1b4d54b1691b89015de7154e0 Mon Sep 17 00:00:00 2001 From: Menno Holtkamp Date: Sun, 5 Jan 2014 18:41:55 +0100 Subject: [PATCH 1/2] Respected 'inheritanceType' at Entity level It was (incorrectly) fetched from Table-level. http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/annotations-reference.html#annref-inheritancetype --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 1a8fde184..6cde3032e 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -69,8 +69,8 @@ class XmlExporter extends AbstractExporter $root->addAttribute('schema', $metadata->table['schema']); } - if (isset($metadata->table['inheritance-type'])) { - $root->addAttribute('inheritance-type', $metadata->table['inheritance-type']); + if ($metadata->inheritanceType) { + $root->addAttribute('inheritance-type', $this->_getInheritanceTypeString($metadata->inheritanceType)); } if ($metadata->discriminatorColumn) { From fc2b9980aea54e83b181d7b6791f1198db532c9d Mon Sep 17 00:00:00 2001 From: Menno Holtkamp Date: Sun, 5 Jan 2014 18:53:31 +0100 Subject: [PATCH 2/2] Exclude exporting inheritanceType for INHERITANCE_TYPE_NONE --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 6cde3032e..33253b668 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -69,7 +69,7 @@ class XmlExporter extends AbstractExporter $root->addAttribute('schema', $metadata->table['schema']); } - if ($metadata->inheritanceType) { + if ($metadata->inheritanceType && $metadata->inheritanceType !== ClassMetadataInfo::INHERITANCE_TYPE_NONE) { $root->addAttribute('inheritance-type', $this->_getInheritanceTypeString($metadata->inheritanceType)); }