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

What's the purpose of transaction_id? #47

Open
sobrinho opened this issue Oct 13, 2023 · 2 comments
Open

What's the purpose of transaction_id? #47

sobrinho opened this issue Oct 13, 2023 · 2 comments

Comments

@sobrinho
Copy link
Contributor

I can see all my records having the same value of id on that column, what's the purpose?

@westonganger
Copy link
Owner

As stated directly in the readme

It will store in the version_associations table additional information to correlate versions of the association and versions of the model when the associated record is changed. When reifying the model, it will utilize this table, together with the transaction_id to find the correct version of the association and reify it. The transaction_id is a unique id for version records created in the same transaction. It is used to associate the version of the model and the version of the association that are created in the same transaction.

@sobrinho
Copy link
Contributor Author

But why it does exist if AFAIK all the values on it is exactly the same value of the primary key of the version_associations table?

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