I am facing a challenge with a simple schema model that includes one-to-many self relations. In this scenario, my goal is to create a parent entity along with its children in a single transaction. How can I accomplish this task effectively?
data-model Y{
id Number @id @default(autoincrement())
title String
childYs Y[] @relation("childY")
parentY Y? @relation("childY", fields: [parentYId], references: [id])
parentYId Number?
}