Revert "Implemented auto-inference of isCascadeRemove when orphanRemoval is defined (marked as todo)."
This reverts commit 551247d11a0346dfb878a1e3571655a9395958ab.
This commit is contained in:
parent
2cfdf2b05d
commit
5e938b3147
@ -909,13 +909,9 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
$mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']);
|
$mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: if orphanRemoval, cascade=remove is implicit!
|
||||||
$mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
|
$mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
|
||||||
(bool) $mapping['orphanRemoval'] : false;
|
(bool) $mapping['orphanRemoval'] : false;
|
||||||
|
|
||||||
// if orphanRemoval, cascade=remove is implicit
|
|
||||||
if ($mapping['orphanRemoval']) {
|
|
||||||
$mapping['isCascadeRemove'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
|
if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
|
||||||
throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']);
|
throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']);
|
||||||
@ -940,14 +936,10 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
throw MappingException::oneToManyRequiresMappedBy($mapping['fieldName']);
|
throw MappingException::oneToManyRequiresMappedBy($mapping['fieldName']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: if orphanRemoval, cascade=remove is implicit!
|
||||||
$mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
|
$mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ?
|
||||||
(bool) $mapping['orphanRemoval'] : false;
|
(bool) $mapping['orphanRemoval'] : false;
|
||||||
|
|
||||||
// if orphanRemoval, cascade=remove is implicit
|
|
||||||
if ($mapping['orphanRemoval']) {
|
|
||||||
$mapping['isCascadeRemove'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($mapping['orderBy'])) {
|
if (isset($mapping['orderBy'])) {
|
||||||
if ( ! is_array($mapping['orderBy'])) {
|
if ( ! is_array($mapping['orderBy'])) {
|
||||||
throw new \InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));
|
throw new \InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user