diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index b52029421..f556257f9 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -909,13 +909,9 @@ class ClassMetadataInfo implements ClassMetadata $mapping['targetToSourceKeyColumns'] = array_flip($mapping['sourceToTargetKeyColumns']); } + //TODO: if orphanRemoval, cascade=remove is implicit! $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (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']) { throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']); @@ -940,14 +936,10 @@ class ClassMetadataInfo implements ClassMetadata throw MappingException::oneToManyRequiresMappedBy($mapping['fieldName']); } + //TODO: if orphanRemoval, cascade=remove is implicit! $mapping['orphanRemoval'] = isset($mapping['orphanRemoval']) ? (bool) $mapping['orphanRemoval'] : false; - // if orphanRemoval, cascade=remove is implicit - if ($mapping['orphanRemoval']) { - $mapping['isCascadeRemove'] = true; - } - if (isset($mapping['orderBy'])) { if ( ! is_array($mapping['orderBy'])) { throw new \InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy']));