You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an abstract class that uses the SoftDeletable trait. I followed the documentation but SoftDeleteableFilter did not apply because the configuration array of SoftDeleteableListener was empty (here).
To solve that I added the annotation to my abstract class, which didn't help (plus I found about that here and not really in the documentation, but got amazed because of the annotation reader in combination with my trait, not sure there at all though).
My actual and unsatisfying solution is to annotate each of my concrete entities plus adding the $deletedAt property (which is already there through the trait).
I am confused. I would have expected that behaviour from the trait alone. Maybe plus the annotation in my abstract class.
Maybe it is related to the fact that I do no auto-mapping (entities in separate folder)? Or ist that a DoctrineExtensions question?
Do you want me to supply some code? It's straight your documentation (I think):
<?php
...
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
abstract class MainEntity extends AbstractEntity
{
use ORMBehaviors\SoftDeletable\SoftDeletable;
}
Sorry for so much text. Is that rather a question for stackoverflow than an issue?
Edit: if I put the $deletedAt in my abstract class I get a Runtime notice ("define the same property..."), which seems understandable, but surprisingly it does not happen in the "Solution".
I have an abstract class that uses the SoftDeletable trait. I followed the documentation but SoftDeleteableFilter did not apply because the configuration array of SoftDeleteableListener was empty (here).
To solve that I added the annotation to my abstract class, which didn't help (plus I found about that here and not really in the documentation, but got amazed because of the annotation reader in combination with my trait, not sure there at all though).
My actual and unsatisfying solution is to annotate each of my concrete entities plus adding the $deletedAt property (which is already there through the trait).
I am confused. I would have expected that behaviour from the trait alone. Maybe plus the annotation in my abstract class.
Maybe it is related to the fact that I do no auto-mapping (entities in separate folder)? Or ist that a DoctrineExtensions question?
Do you want me to supply some code? It's straight your documentation (I think):
My abstract class (which did still not work):
"Solution":
What am I missing? Thank you a lot.
Sorry for so much text. Is that rather a question for stackoverflow than an issue?
Edit: if I put the $deletedAt in my abstract class I get a Runtime notice ("define the same property..."), which seems understandable, but surprisingly it does not happen in the "Solution".
PHP 5.5.11, stof/doctrine-extensions-bundle: v1.2.2, gedmo/doctrine-extensions: v2.4.12
The text was updated successfully, but these errors were encountered: