Issue Task Under Review

#111444Resolve descendants for the tree parent loop protection with one query

Benni Mack 11/13/26, 20:32 updated 11/15/26, 01:14

Description

When the parent field of a record in a tree relation to its own table is edited (e.g. `sys_category.parent`), the record and all its descendants are marked unselectable (#91608). The descendants are looked up level by level, with one query per descendant.

A recursive CTE resolves the whole subtree in one query and follows workspace versions, so a record moved to another parent in a workspace is found below its new parent.

Fields whose records can have several parents (MM, `foreign_field`, comma separated lists) keep the current lookup.

Reviews 1

History 02