diff --git a/en/orm/behaviors/tree.rst b/en/orm/behaviors/tree.rst index c8f321301c..3cb6d94342 100644 --- a/en/orm/behaviors/tree.rst +++ b/en/orm/behaviors/tree.rst @@ -18,6 +18,7 @@ The TreeBehavior helps you maintain a hierarchical data structure in the database that can be queried without much overhead and helps reconstruct the tree data for finding and displaying processes. + Requirements ============ @@ -31,6 +32,16 @@ You can configure the name of those fields should you need to customize them. More information on the meaning of the fields and how they are used can be found in this article describing the `MPTT logic `_ +.. warning:: + + The TreeBehavior is not safe for concurrent write operations. + Simultaneous requests that modify tree-structured data + (e.g., insertions, deletions, or moves) can lead to corruption of the + ``lft`` and ``rght`` values. + + To prevent this, a locking mechanism like a + `Semaphore `_ should be used. + .. warning:: The TreeBehavior does not support composite primary keys at this point in