Skip to content

How to associate parent to children so children has the id of parent? #1679

Discussion options

You must be logged in to vote

You will need to perform a payload.findByID (see here) operation to look up the entire step document.

// Note: there will be a more eloquent way to do this, since you will likely want to loop and get all steps?
const fullDoc = await payload.findByID({ collection: 'steps', id: step[0].value });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zubricks
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