

Lesson 07 · 11 min
Nested writes, connect, and upsert
Create an order with items and link it to an existing user — in one call.
11 minLesson 7 of 9Practice includedAsk AI on any point
In data you can also write to related models. create creates new records, connect links an existing one by a unique field, connectOrCreate links or creates. Prisma runs such a nested write in one transaction. upsert updates a record if it exists and creates it if not.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.