Skip to content

[Question] Supporting circular references in destination types #215

Description

@cannonpalms

Imagine I have the following destination types:

interface Parent {
    name: string;
    children: Child[];
}

interface Child {
    name: string;
    parent: Parent;
}

When defining a schema to map some source to Parent, I can define a second schema for mapping said source to a Child. However, in that second schema, I cannot provide an action for mapping the parent property of the Child, because until the Child mapping is made and the Parent created, we have no reference or value to assign to the property.

Ignoring serialization for a moment, how would you recommend defining schema for mapping to these types?

Activity

  1. changed the title [-][Question] Supporting circular references / after morph property assignment[/-] [+][Question] Supporting circular references in destination types[/+] on Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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