Merge pull request #458 from barelon/master
Use cascade=all if all cascade options set
This commit is contained in:
commit
0c8be37ca9
2 changed files with 9 additions and 0 deletions
|
@ -1045,6 +1045,10 @@ public function __construct()
|
||||||
if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
|
if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
|
||||||
if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
|
if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
|
||||||
|
|
||||||
|
if (count($cascades) === 5) {
|
||||||
|
$cascades = array('"all"');
|
||||||
|
}
|
||||||
|
|
||||||
$typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
|
$typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,11 @@ class PhpExporter extends AbstractExporter
|
||||||
unset($cascade[$key]);
|
unset($cascade[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($cascade) === 5) {
|
||||||
|
$cascade = array('all');
|
||||||
|
}
|
||||||
|
|
||||||
$associationMappingArray = array(
|
$associationMappingArray = array(
|
||||||
'fieldName' => $associationMapping['fieldName'],
|
'fieldName' => $associationMapping['fieldName'],
|
||||||
'targetEntity' => $associationMapping['targetEntity'],
|
'targetEntity' => $associationMapping['targetEntity'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue