-
Notifications
You must be signed in to change notification settings - Fork 239
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
Descendants & Ancestors not working #245
Comments
It looks like you're using a "deleted_at"/tombstone gem. Those most likely
will wreak havoc with closure tree queries. Try it without.
Fwiw, I've found that moving records to a deleted_* table to "delete" is
much less problematic. It's really hard to ensure all queries, including
joins and unions, are applying that constraint properly.
|
@mceachen Thanks for the quick response. I'll give it a try and let you know. |
same issue as #197 using update_all |
Ah, OK. If you think an update to the readme is in order, I'd welcome an
edit!
|
Excellent! I'll give it a go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My configuration:
I'm getting my hierarchies from a 3rd party API. The API responds with the children of a given parent. I assign the parent_id on the children as follows:
When I walk through the tree agent.ancestors returns nil. However, the parent child relationship is established. I can look down, but I can't go up:
I tried to go about it the opposite direction by adding the child to the parent:
This is my first goaround with colsure_tree.
Is there something I'm missing?
Is there a remedy that will get this to work correctly? Reset the hierarchy?
The text was updated successfully, but these errors were encountered: