Open BriceFab opened 1 year ago
It's seems to be good by setting hardDelete to false:
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false, hardDelete: false)]
But, is it the right way to fix it 🤔
It's seems to be good by setting hardDelete to false:
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false, hardDelete: false)]
But, is it the right way to fix it 🤔
Update: this fix seems to only work on local environnement but not in production. Maybe due to caching
Hello,
I'm currently facing an issue with the SoftDeletable filter in my project. I have an entity called 'Exercise' which has a 'mainExercise' association. https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/softdeleteable.md
The problem occurs when I delete an exercise that is referenced as the 'mainExercise' in another exercise. It throws the following error:
Entity of type 'Exercise' for IDs id(X) was not found.
On the frontend, I was able to resolve this error by setting the fetch mode to 'EAGER', which correctly loads the 'mainExercise' as null.
Is there a solution to this?
For super-admins, the SoftDeletable filter is disabled and it works as intended, which is expected. However, for other roles, I need to have the filter enabled on deleted entities in order not to display them.
Thank you for your attention