Skip to content

Reverse Reference retrieve with owner-both association is typed as single object #380

@hjotha

Description

@hjotha

Problem

A microflow retrieve that navigates a Reference association from the child side can be written back as an association retrieve even when the association has explicit ownership metadata and the parent entity is persistable.

For a one-to-many reverse traversal, an association retrieve source represents a single object. The builder should instead emit a database retrieve source with an XPath constraint so the result remains a list of parent objects.

Expected behavior

For an explicit-owner Reference association, including Owner=Both, child-to-parent traversal over a persistable parent should be written as a database retrieve with an XPath constraint such as:

retrieve $Parents from database Sample.Parent where [Sample.Parent_Child = $Child];

Fallback association-source syntax is still acceptable when ownership metadata is missing or the parent entity is not persistable, but the inferred result type should remain List of Sample.Parent for child-side traversal.

Impact

Downstream actions that rely on the retrieved value being a list can become invalid after round-trip when the reverse traversal is typed as a single object.

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