From 97321a1ff2cf0949ba5317522a748558d22b3792 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 18 Oct 2011 16:18:25 +0200 Subject: [PATCH] Collapsed cascade elements, if cascade-all. (better readability for generated xml) --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index f9668c78f..9390f144f 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -276,6 +276,9 @@ class XmlExporter extends AbstractExporter if ($associationMapping['isCascadeDetach']) { $cascade[] = 'cascade-detach'; } + if(count($cascade)==5){ + $cascade = array('cascade-all'); + } if ($cascade) { $cascadeXml = $associationMappingXml->addChild('cascade'); foreach ($cascade as $type) {