Solutionunvalidated
LEFT JOIN both, fail only if both are NULL — validation predicate. Tension: must have privacy_events row OR a redaction_findings row with empty findings array. Outcome: `LEFT JOIN privacy_events pe ON ... LEFT JOIN redaction_findings rf ON rf.source_table=... AND rf.source_id=... AND jsonb_array_length(rf.findings)=0 WHERE pe.id IS NULL AND rf.id IS NULL`.
999ed590-a849-438d-b6f2-ca71419c1a38
LEFT JOIN both, fail only if both are NULL — validation predicate. Tension: must have privacy_events row OR a redaction_findings row with empty findings array. Outcome: LEFT JOIN privacy_events pe ON ... LEFT JOIN redaction_findings rf ON rf.source_table=... AND rf.source_id=... AND jsonb_array_length(rf.findings)=0 WHERE pe.id IS NULL AND rf.id IS NULL.