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

Child key must be bigger than parent key #27

Closed
jesusisao opened this issue Dec 6, 2020 · 2 comments
Closed

Child key must be bigger than parent key #27

jesusisao opened this issue Dec 6, 2020 · 2 comments

Comments

@jesusisao
Copy link
Contributor

jesusisao commented Dec 6, 2020

Problem

When the child's ID is smaller than the parent's ID, the child may not be associated properly.
The reason is that there is code that sorts by parent ID, then sorts by ID, and adds to the tree.

example

before

PR

I think you can solve this problem by sorting the list by the depth of the tree.

Here is a suggestion:
#26

@DenQ
Copy link
Owner

DenQ commented Dec 7, 2020

@jesusisao Hi. I will to look it in near days. Thanks you!

@DenQ DenQ closed this as completed Dec 14, 2020
@DenQ
Copy link
Owner

DenQ commented Dec 14, 2020

Thanks! 💯

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