Tom Ashford
07/19/2022, 11:44 AMmodel User {
...
profile Profile @relation(fields: [profileID], references: [id])
profileID Int @unique
}
model Profile {
...
user User?
}
I'm ensuring I can't create a User without a Profile, but that way a Profile won't get deleted if a User is deleted, right? Currently I have it the other way around so I get the cascades but then I can't require the creation of the Profile, which I'd really like to be able to do as I have a bunch of structures like this. CheersTom Ashford
07/19/2022, 12:07 PM