Bug #36804
Orphaned entities within aggregates are not removed
Status: | New | Start date: | 2012-05-03 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Persistence | |||
Target version: | - | |||
PHP Version: | Complexity: | hard | ||
Has patch: | No | Affected Flow version: | Git master |
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
History
#1 Updated by Karsten Dambekalns over 3 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 3 years ago
Also check #28016