Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softdeletable and loggable not working together (soft deletion is not logged). #317

Closed
Abdel5 opened this issue Feb 20, 2016 · 3 comments
Closed

Comments

@Abdel5
Copy link

Abdel5 commented Feb 20, 2016

Hi,

I have tried to use Softdeletable and loggable behaviours together but this does not seem to work. Eventhough I have SoftDeleteable column marked as Versioned soft deletion does not result in new log in log mySQL table.

/**
 * @ORM\Entity
 * @ORM\Table
 * @Gedmo\Loggable
 * @Gedmo\SoftDeleteable(fieldName="usuniety", timeAware=false)
 */
class dokument
{
/.../
 /**
     * @ORM\Column(type="datetime", nullable=true)
     * @Gedmo\Versioned
     */
    private $usuniety;
@dangebault
Copy link

Hi,

I have the same issue, do you solve your problem ?

Thanks !

@lucasgranberg
Copy link
Contributor

Same here. It has to do with priorities as stated here doctrine-extensions/DoctrineExtensions#1397

If I bump the priority of loggable it works. I just edited the StofDoctrineExtensionsExtension.php file and added $attributes['priority'] = 10; to line 49

lucasgranberg added a commit to lucasgranberg/StofDoctrineExtensionsBundle that referenced this issue Apr 20, 2016
Loggable and softdeleteable has priority 0 and softdeleteable happens before loggable so the remove is never logged.
Fixes stof#317
@SamMcSam
Copy link

Can someone merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants