I don't even know if it's possible, but I'm trying to create two records simultaneously.
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
role Role @default(USER)
posts Post[]
profile Profile?
}
Let says I want to create a user and a profile in the same call, so if the user profile fails, I also wish the User creation will fail.
I can get the desired result if I make a User and await the user Id and Id to create the Profile, but that way, I'm writing twice to the database, and If the Profile fails, I can't roll back the User.