From c97eff94f56929238ace052af4b5e77df93c9317 Mon Sep 17 00:00:00 2001 From: barelon Date: Sun, 30 Sep 2012 01:12:06 +0300 Subject: [PATCH] Output cascade={"all"} if all cascade options set --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 3e20ee5f7..542bb3f0a 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -1045,6 +1045,10 @@ public function __construct() if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"'; if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"'; + if (count($cascades) === 5) { + $cascades = array('"all"'); + } + $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}'; }