#5073·nhost

dashboard: table permissions, column comparisons inside a relationship can't reference the root table

Author: dbm03Created Sep 25, 2026Updated Sep 25, 2026
Labelsbug

Problem In the Visual editor, inside a relationship block, the value picker for column-comparison operators (_ceq, _cne, _cgt, _clt, _cgte, _clte) only lists the related table's columns and always writes ["column"]. You can't reference a column of the table you're editing (["$", "column"]). A root reference entered in JSON renders the same as a same-table one, and re-picking it in Visual silently turns it into ["column"].

Steps to reproduce

  1. Create review_authors (id uuid, name text, owner_id uuid) and review_posts (id uuid, title text, author_id uuid → review_authors.id, owner_id uuid), and add an object relationship author on review_posts.
  2. Open Edit Permissions for review_posts, then the Select cell for user, then With custom check (Visual).
  3. Add check → author. Inside the block, Add → owner_id, then change the operator to _ceq.
  4. Open the value picker: it lists only id, name, owner_id from review_authors, not review_posts.owner_id.
  5. Switch to JSON and paste {"author": {"owner_id": {"_ceq": ["$", "owner_id"]}}}, then switch back to Visual: the value shows as owner_id.
  6. Re-pick owner_id in the value picker and switch to JSON: it's now ["owner_id"].

Expected The picker offers the root table's columns and writes ["$", "column"] for them.

Workaround Enter the filter in JSON and don't re-pick the value in Visual. The metadata accepts ["$", "owner_id"].