sonata-project/EntityAuditBundle

Auditing OneToOne relations and their Entities

RonFire opened this issue · 4 comments

Q A
Bug report? no
Feature request? no
BC Break report? no

Hello,

Im right now having an issue with the usage of auditing OneToOne relations.
Im using your bundle in the context of the SonataAdminBundle.
By default all Admin-related entities seem to be audited automatically.
Now my audited entity has relations like this one:

    /**
     * @var \AppBundle\Entity\Elearning
     *
     * @ORM\OneToOne(targetEntity="AppBundle\Entity\Elearning", cascade={"persist"})
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="elearning_id", referencedColumnName="id", nullable = true)
     * })
     */
    private $elearning;

Changes In this entity are not audited at all. i probably missed something in the configuration since the tutorial here: https://sonata-project.org/bundles/doctrine-orm-admin/master/doc/reference/audit.html

does not state anything at all.
I hope someone with some experience with the usage of your bundle within SonataAdmin can help along.

Best regards,
Ronald

tolry commented

@NerdusMaximus which version are you using? master is currently not stable and might cause the problems you described

Hey there,
im using "simplethings/entity-audit-bundle": "^1.0"
The only way i got other entites to be audited was to configure a separate Admin-Class.
But there i have the Problem that changes in this injected Admin-Class are not stored in a version of my base Entity but in the corresponding Auditing.

Basically i am looking for a solution to Audit changes over all entities which are injected into one major form of a Sonata-Admin class within one diff or Versioning without having to audit them all separately.

I hope you get my point. Im quite tired and my english is a mess right now.
If i can give you any more information to understand my issue please tell me.

Best regards,
Ronald

@tolry can you give me any hint on how to realize this? Or do you need more information on what i try to achieve? Appreciate any help.

Best regards,
Ronald

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.