1
0
mirror of synced 2025-01-18 22:41:43 +03:00

[2.0] Fixed AnnotationDriver that was incorrectly inspecting cascades in associations.

This commit is contained in:
guilhermeblanco 2010-03-08 23:42:38 +00:00
parent 4a07ac26da
commit c680b8fe1d

View File

@ -357,11 +357,11 @@ class AnnotationExporter extends AbstractExporter
} }
if ($associationMapping->hasCascades()) { if ($associationMapping->hasCascades()) {
$cascades = array(); $cascades = array();
if ($this->isCascadePersist) $cascades[] = '"persist"'; if ($associationMapping->isCascadePersist) $cascades[] = '"persist"';
if ($this->isCascadeRemove) $cascades[] = '"remove"'; if ($associationMapping->isCascadeRemove) $cascades[] = '"remove"';
if ($this->isCascadeDetach) $cascades[] = '"detach"'; if ($associationMapping->isCascadeDetach) $cascades[] = '"detach"';
if ($this->isCascadeMerge) $cascades[] = '"merge"'; if ($associationMapping->isCascadeMerge) $cascades[] = '"merge"';
if ($this->isCascadeRefresh) $cascades[] = '"refresh"'; if ($associationMapping->isCascadeRefresh) $cascades[] = '"refresh"';
$typeOptions[] = 'cascade={' . implode(',', $cascades) . '}'; $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
} }
if (isset($associationMapping->orphanRemoval) && $associationMapping->orphanRemoval) { if (isset($associationMapping->orphanRemoval) && $associationMapping->orphanRemoval) {