1
0
mirror of synced 2025-01-19 06:51:40 +03:00

Merge pull request #458 from barelon/master

Use cascade=all if all cascade options set
This commit is contained in:
Benjamin Eberlei 2012-10-05 09:45:44 -07:00
commit 0c8be37ca9
2 changed files with 9 additions and 0 deletions

View File

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

View File

@ -99,6 +99,11 @@ class PhpExporter extends AbstractExporter
unset($cascade[$key]);
}
}
if (count($cascade) === 5) {
$cascade = array('all');
}
$associationMappingArray = array(
'fieldName' => $associationMapping['fieldName'],
'targetEntity' => $associationMapping['targetEntity'],