Basically the question is how do I do nested inser...
# orm-help
o
Basically the question is how do I do nested inserts/updates when the nesting level is more than 1 deep?
a
There’s an example here that might help:
Copy code
const user = await prisma.user.update({
  where: { email: '<mailto:alice@prisma.io|alice@prisma.io>' },
  data: {
    profile: {
      create: { bio: 'Hello World' },
    },
  },
})
I assume you would just continue using the pattern where you follow the relation name by create.
r
Hey @Oleg Zeltser 👋 Did the above work for you?
o
@Ryan Sorry, I did not get back to you right away. It seems to work, it's just I have to iterate through my objects and add the create commands. Working on that now.
💯 1
Yes, that worked, thank you!
💯 1