Skip to content

Object-valued owner-both reverse retrieves can rebuild as lists #383

@hjotha

Description

@hjotha

Summary

A compact reverse Reference retrieve over an owner-both association can be rebuilt as a database retrieve with list cardinality even when later expressions consume the result as a single object.

Symptoms

A microflow can contain a compact retrieve like:

retrieve $Parent from $Child/Sample.Parent_Child;
call microflow Sample.UseParent(parentName = $Parent/Name);

After describe + exec, the retrieve may be stored as a database retrieve returning a list. The following attribute path then becomes invalid because $Parent is no longer object-valued.

Expected behavior

When the retrieved variable is later used through an object attribute path, the builder should preserve the compact association retrieve and object-valued typing.

When the same owner-both reverse retrieve is later used as a list input, such as in a loop, the builder should still emit the database/list shape needed by list consumers.

Notes

This is a follow-up to the reverse owner-both list retrieve fix. The missing distinction is not association metadata alone; the builder also needs downstream usage context.

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