Bug #45640
Every relation is set to cascade=all if the related entity is no aggregate root
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.
Updated by Benno Weinzierl about 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={}
Updated by Adrian Föder about 8 years ago
- Priority changed from Must have to Could have
- Target version deleted (
2.0)