-
Notifications
You must be signed in to change notification settings - Fork 895
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
Restoring has_many associacions #652
Comments
Instead of using
Note how This is surprising behavior, so I'm inclined to call it a bug, but I haven't the slightest idea how to fix it 😢 Associations, and especially the reification of associations, is still an experimental feature in PaperTrail, and I don't recommend using it in production yet. |
Hi @jaredbeck, thanks for answering. I just went through some more testing. After the reify, length and count behave in the same way (right after template_old is written). I also tried eaching over the assets and it was identical with count/length. I also had a look at the reify_has_many_directly function in version_concern.rb. In line 384 where the collection is put into the model, the collection also reflects the "live" state of the relation rather than the state of the relation at the time of the version. Hope this helped, let me know if i can help with some further testing or debugging. |
Can you please confirm this is still an issue in the latest PT (currently 5.1.1)? Thanks. |
Closing due to lack of activity. |
Hi,
I'm not sure if this is a bug, or if I'm simply doing something wrong. I have two very simple models:
This is the test I use at the moment:
Thanks in advance!
The text was updated successfully, but these errors were encountered: