Changes in ManyToMany associations are not recognized / logged
The readme states:
many to many relation changes, association and dissociation actions.
But actually, when changing a many-to-many relation (in terms of their assigned values) on an entity with the #[Auditor\Auditable] attribute, the changes are not recognized / logged.
All other properties work like a charm.
Am I doing something wrong?
@micronax thanks for the report, can you give me some example code that reproduces the problem?
I can confirm this issue as well, for many to many unidirectional relation.
There is many to many association from entity "User" to entity "Group", very simple
Here are the generated tables:
So you see, user_group_audit table should exist if audit supports audit of many-to-many relations.
Does this helps? Ping me if you need more info.
I'm new to auditor and just started trying to port my own audit system onto auditor-bundle, so I'm not yet that familiar with Auditor's approach (I had a single audit table before my client's company blew up in size haha).
I'm not sure if the user_group_audit approach is more in line with auditor's approach, but I wonder if it should be treated more like OneToMany, where I'd log the change at each entity's own audit table - that way I could see handling nullable relationships etc.
Do I make sense or should I try to cook up an example?