Skip to content

children_count not always in sync with the actual count of children #684

@seenanair

Description

@seenanair

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions