Bug #45640

Every relation is set to cascade=all if the related entity is no aggregate root

Added by Benno Weinzierl over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
2013-02-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Example structure:

Product => OneToMany => Variant
BasketItem => ManyToOne => Variant

If Variant is no aggregate root it is deleted when BasketItem is deleted because cascade=all is automatically set in
TYPO3\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver per default.
Around line 540.

This (IMHO not very helpful) default behavior cannot be overwritten by the annotation because cascade={} throws errors.

#1

Updated by Benno Weinzierl over 8 years ago

As discussed in the IRC channel this case according to DDD should not happen.

Still it would be nice to overwrite this behavior by providing cascade={}

#2

Updated by Adrian Föder over 8 years ago

  • Priority changed from Must have to Could have
  • Target version deleted (2.0)

Also available in: Atom PDF