TL;DR
A property declared type: reference with a formula produces string output, not a reference value. The declared type: reference is silently ignored.
Reproduction (probed 2026-05-18 against api.entu.app/polyphony)
- Create temp entity type with property:
{ name: ref_via_formula, type: reference, formula: _parent }
- Create a parent entity (any type)
- Create an instance of the temp type under that parent
- GET the instance
Returns:
"ref_via_formula": [
{ "string": "<parent's name>" }
]
No reference key — value is stored as string regardless of the declared type: reference.
Source
entu/api/utils/formula.js — the formula() function only returns { string: X } or { number: X }. No { reference: X } output path exists.
Implication
Apps designing on Entu can't expect formula-populated reference properties to behave as refs. They should declare formula-bearing properties as type: string for honest schema, or accept the type-vs-output mismatch.
Suggested doc note
At https://www.entu.ee/api/formulas/ (or properties config docs): add a note that formula output is always string or number; declaring type: reference on a formula property is silently ignored.
Related: polyphony case study D3 — https://github.com/entu/research/blob/main/docs/case-studies/2026-05-polyphony-on-entu.md
TL;DR
A property declared
type: referencewith aformulaproduces string output, not a reference value. The declaredtype: referenceis silently ignored.Reproduction (probed 2026-05-18 against api.entu.app/polyphony)
{ name: ref_via_formula, type: reference, formula: _parent }Returns:
No
referencekey — value is stored as string regardless of the declaredtype: reference.Source
entu/api/utils/formula.js— theformula()function only returns{ string: X }or{ number: X }. No{ reference: X }output path exists.Implication
Apps designing on Entu can't expect formula-populated reference properties to behave as refs. They should declare formula-bearing properties as
type: stringfor honest schema, or accept the type-vs-output mismatch.Suggested doc note
At https://www.entu.ee/api/formulas/ (or properties config docs): add a note that formula output is always string or number; declaring
type: referenceon a formula property is silently ignored.Related: polyphony case study D3 — https://github.com/entu/research/blob/main/docs/case-studies/2026-05-polyphony-on-entu.md