Skip to content

adding child when adding parent #638

Answered by jmikrut
MattRvt asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @MattRvt — right now, this is not possible. It could be a a future feature that we build, but it'll take some new functionality to achieve. The way we'd do this currently is to first create the nested document, then pass the newly created document's ID to your parent doc.

So:

const parentDocData = {
    "name": "parent",
    "child": "6a3434543qw3derra" // ID of newly created child doc
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MattRvt
Comment options

@jmikrut
Comment options

Answer selected by MattRvt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants