neat-php / object

Neat Object components
MIT License
4 stars 1 forks source link

Relation all should not use filtered decorator results #21

Closed annavanbiemen closed 4 years ago

annavanbiemen commented 4 years ago

The SoftDelete decorator breaks relations with repositories that have this decorator when loading and storing an object relation subsequently.

Instead of interfacing with the decorated repository stack, the relation should be able to use a repository without at least the SoftDelete decorator in order to allow for reliable results when loading a relation and storing the results.

A repository stack might have this API:

$repository = $decoratedRepository->without(SoftDelete::class);