DataDogAuditBundle icon indicating copy to clipboard operation
DataDogAuditBundle copied to clipboard

Duplicates in associations table

Open curtchan opened this issue 6 years ago • 5 comments

I don't think it should create multiple rows with same data whenever object is used?

curtchan avatar Aug 02 '19 12:08 curtchan

well, this is an audit log, would you expect to lose all history if association object is removed?

l3pp4rd avatar Aug 02 '19 14:08 l3pp4rd

well, this is an audit log, would you expect to lose all history if association object is removed?

You misunderstood me. The issue is that it creates multiple rows for same entity - that is same tbl, same entity, same fkey, i highly doubt if that's supposed to happen like that. Example: Someone updates entity A 3 times. log table has 3 rows - nice. association log table has... 6 rows (3 times for A table, 3 times for User), where 4 are duplicates, what's the point of that?

curtchan avatar Aug 05 '19 09:08 curtchan

Yes probably if association remains unchanged it could use the most recent version of it.

l3pp4rd avatar Aug 08 '19 05:08 l3pp4rd

I agree with that. Now it creates a new entries in the associations every time, so if intended to work this way, then better this data to be part of the audit_log table. I have some ideas for optimizations, can I contribute here, or the project is frozen?

indjeto avatar Jan 29 '24 18:01 indjeto

sure you can contribute, since I no longer use PHP there is noone to maintain it. will add you to maintainer list

l3pp4rd avatar Feb 01 '24 07:02 l3pp4rd