See Jee
09/15/2022, 6:03 AMmodel Media {
mediaUid String @id @db.Uuid
title String
}
model Document {
documentUid String @id @db.Uuid
title String
}
model Post {
postUid String @id @db.Uuid
attachedUid String @db.Uuid
title String
}
The attachedUid in Post table is the uid of Document or Media. When I delete the Media or Document I want to delete it too in Post.Raphael Etim
09/15/2022, 6:12 AMSee Jee
09/15/2022, 6:18 AMSee Jee
09/15/2022, 6:29 AMRaphael Etim
09/15/2022, 6:32 AMSee Jee
09/15/2022, 6:35 AMRaphael Etim
09/15/2022, 6:37 AMMedia
, Document
, and Post
. Is it 1-1, 1-M or M-M? You will need to think in terms of two models say between Media and Document, or Media and Post or Document and Post.See Jee
09/15/2022, 6:46 AMRaphael Etim
09/15/2022, 6:59 AMVladi Stevanovic
See Jee
09/22/2022, 8:12 AMRaphael Etim
09/23/2022, 10:28 AMVladi Stevanovic