Jonathan Marbutt
02/03/2022, 3:18 PMEntityCommon
where I would keep some common fields like UpdatedDate
Name
and a few others. This allowed me to do global searching and other things in the app. So my question is how to best accomplish this in prisma, I know I will just have to manually create the model
in the schema and link every table to it as a 1:1 relationship.
Where I start to run in my question, is generating the data in the EntityCommon
table, other ORMs handle this pretty well, but I would prefer to do it at the database level anyways. Would I be better off creating a trigger for each table to maintain the EntityCommon
and should I keep those triggers in something for the migrations? Or should I rely on the $on
events in prisma?