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
With numeric ordering, root nodes are, by default, assigned order values globally across the whole database table. Sofor instance if you have 5 nodes with no parent, they will be ordered 0 through 4 by default. If your model represents many separate trees and you have a lot of records, this can cause performance problems, and doesn't really make much sense.
495
+
496
+
You can disable this default behavior by passing `dont_order_roots: true` as an option to your delcaration:
In this case, calling `prepend_sibling` and `append_sibling` on a root node or calling `roots_and_descendants_preordered` on the model will raise a `RootOrderingDisabledError`.
503
+
504
+
The `dont_order_roots` option will be ignored unless `numeric_order` is set to true.
505
+
506
+
492
507
## Concurrency
493
508
494
509
Several methods, especially ```#rebuild``` and ```#find_or_create_by_path```, cannot run concurrently correctly.
0 commit comments