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

Option to disable blameable in messenger #395

Open
konradja100 opened this issue Mar 26, 2019 · 2 comments
Open

Option to disable blameable in messenger #395

konradja100 opened this issue Mar 26, 2019 · 2 comments

Comments

@konradja100
Copy link

Hi, we're using this bundle in our application, as well as symfony/messenger component, and we have some issues using Blameable on one entity.

Entity has two fields with stof annotations:

    /**
     * @var \DateTime
     *
     * @Gedmo\Timestampable(on="update")
     * @ORM\Column(type="datetime")
     */
    private $updatedAt;

    /**
     * @var User
     *
     * @Gedmo\Blameable(on="update")
     * @ORM\ManyToOne(targetEntity="App\Entity\User")
     * @ORM\JoinColumn(name="updated_by", referencedColumnName="id", nullable=true, onDelete="SET NULL")
     */
    private $updatedBy;

During processing messages in messenger (console process), we're updating this entity, so $updatedAt field is updated with new \DateTime, and $updatedBy is set to NULL, as it should be in this application context. But we want to keep $updatetBy field with previous value.

Is there any knowk walkaround to achieve this?

@konradja100
Copy link
Author

Anyone?

@ahmed-bhs
Copy link

Up @stof

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

2 participants