2 ms·
because when you are getting a child record through a join (in the view), the parent will never have deleted_at set. Say I have a simple view `select * from fo
by jermaustin1 4y ago
because when you are getting a child record through a join (in the view), the parent will never have deleted_at set.
Say I have a simple view `select * from foo join bar on foo.foo_id = bar.foo_id where foo.deleted_at is null`
I never have to worry about deleting from bar, because I should never grab a child when the parent is 'deleted'.
- thehappypm 4y agoAssuming that the joins are always joined against the views, not the raw tables. This introduces an opportunity for a mistake.