TerminusDB 11.1.3 lets you use @unfoldable on cyclical types, such as a Person whose friend property points at another Person. It was released on 28 September 2023.
- Unfold cyclical types — a cycle returns an ID reference instead of recursing forever.
- Always-on cycle detection — document retrieval detects cycles everywhere.
Unfold cyclical types
What it does
@unfoldable now works on types that refer back to themselves. When retrieval hits a document it has already expanded, it returns the document's ID instead of unfolding again. Before this release, a cyclical @unfoldable schema could recurse without end; now it can't.
{
"@id": "Person",
"@type": "Class",
"@unfoldable": [],
"name": "xsd:string",
"friend": { "@type": "Optional", "@class": "Person" }
}A Person whose friend chain comes back around returns the repeated document as Person/... rather than expanding again.
Why it matters
This change allows you to safely unfold cyclical types without causing infinite recursion. It's particularly useful for social networks, recommendation systems, and other domains where entities can reference each other in complex ways.
Read more: @unfoldable in the schema guide · Document unfolding reference
Always-on cycle detection
What it does
Document retrieval now always runs cycle detection, regardless of schema annotations. Foreign types also interact correctly with collections.
The release notes also restate the merge_repeats insert flag, which first shipped in TerminusDB 11.1.2.
Upgrade
docker pull terminusdb/terminusdb-server:v11.1.3No data migration is needed. Docker install guide · GitHub release
Previous: TerminusDB 11.1.2 · Next: TerminusDB 11.1.6 · TerminusDB 11.1 changelog · Release index