News for hackers. Stuff that matters.
Re:Do you really need foreign keys? by out_of_protocol on Thursday December 21, 2023 @01:33PM (#38724634)
Doesn't help much though. It only takes not wrapping related inserts into transaction in one place in your code. i know zero frameworks/ORMs that can help you with that
Re:Do you really need foreign keys? by tacone on Thursday December 21, 2023 @01:45PM (#38724844)
I usually wrap everything (including reads) in a transaction at middleware level. Not perfect, has its downsides but for many projects it's perfectly ok.

Of course it's not a real substitute for foreign keys, but definitely better than nothing.