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) . '}'; }