Bug #36804

Orphaned entities within aggregates are not removed

Added by Robert Lemke over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
2012-05-03
Due date:
% Done:

0%

PHP Version:
Has patch:
No
Complexity:
hard

Description

Consider this example:

An entity Image has a many-to-one or one-to-one relation to an entity Resource.
Image is an aggregate root and is stored in an ImageRepository.
Resource does not have its own repository and thus is a practically member of the Image aggregate.

Now, if an Image object is removed, its Resource object remains in the database and can't accessed through any object or repository anymore.


Related issues

Related to TYPO3.Flow - Bug #28016: Cascade remove of cleared ArrayCollection Needs Feedback 2011-07-09
Blocks TYPO3.Flow - Task #36800: Streamline Resource object API Accepted 2012-01-26

History

#1 Updated by Karsten Dambekalns over 7 years ago

Not a cascade problem - it would need orphanRemoval, but that is not available for the association type used…

#2 Updated by Bastian Waidelich over 7 years ago

Also check #28016

Also available in: Atom PDF