You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been using the Ancestry gem for a while, and as part of the implementation, we are utilizing the counter_cache feature, which allows us to use the children_count column. However, we are encountering an issue where the children_count is not always in sync with the actual count of children.
I was wondering if anyone else has faced a similar issue, and if so, it would be great to hear about any solutions or possible reasons this might be happening. Could it be that the Ancestry callbacks are being interfered with, possibly due to the order in which they are executed alongside model object callbacks?
Is there a way to ensure that Ancestry updates occur after all model object callbacks have been executed?
Thank you!
The text was updated successfully, but these errors were encountered:
@kbrock Thanks for your quick reply. Yes, It is hard to reproduce.
Seeing the update, I hope it is better to use rebuild_counter_cache as a fix?
Also, I can see it is not yet released. Is there any plans for a release soon?
We have been using the Ancestry gem for a while, and as part of the implementation, we are utilizing the counter_cache feature, which allows us to use the children_count column. However, we are encountering an issue where the children_count is not always in sync with the actual count of children.
I was wondering if anyone else has faced a similar issue, and if so, it would be great to hear about any solutions or possible reasons this might be happening. Could it be that the Ancestry callbacks are being interfered with, possibly due to the order in which they are executed alongside model object callbacks?
Is there a way to ensure that Ancestry updates occur after all model object callbacks have been executed?
Thank you!
The text was updated successfully, but these errors were encountered: