Skip to content

Docs: reference_query is static — no per-instance placeholder substitution #5

Description

@mitselek

TL;DR

reference_query set on a property type definition is parsed as a static string. There is no per-instance variable substitution (no {{_parent}}, {{currentEntity.X}}, etc.).

Source

entu/webapp/app/components/my/select/reference.vue:50-52:

if (props.query) {
  filter = { ...queryStringToObject(props.query), ...filter }
}

The query string is parsed once with queryStringToObject and merged with the base filter verbatim.

Implication

Cannot use reference_query to filter the picker contextually — e.g., "show only members of this lending's grandparent organization" doesn't work, because there's no way to inject the current entity's grandparent ID into the query.

Apps that need contextual filtering must do it at the app layer (their own UI or BFF) rather than rely on reference_query. The Entu webapp's built-in picker offers only the static-filtered list.

Suggested doc note

At the reference_query documentation (currently in entity-types or properties docs): explicitly state that the value is static and no placeholder substitution is supported.

Related: polyphony case study D7 — https://github.com/entu/research/blob/main/docs/case-studies/2026-05-polyphony-on-entu.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions