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

Duplicates in associations table #60

Open
curtchan opened this issue Aug 2, 2019 · 5 comments
Open

Duplicates in associations table #60

curtchan opened this issue Aug 2, 2019 · 5 comments

Comments

@curtchan
Copy link

curtchan commented Aug 2, 2019

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

@l3pp4rd
Copy link
Member

l3pp4rd commented Aug 2, 2019

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

@curtchan
Copy link
Author

curtchan commented Aug 5, 2019

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?

@l3pp4rd
Copy link
Member

l3pp4rd commented Aug 8, 2019

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

@indjeto
Copy link
Collaborator

indjeto commented Jan 29, 2024

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?

@l3pp4rd
Copy link
Member

l3pp4rd commented Feb 1, 2024

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

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

3 participants