Resolve "Support polymorphic association with LooseForeignKeys"
What does this MR do and why?
This merge request introduces support for conditions in LFK definitions, enabling more granular control over the impact on child records when a parent record is deleted.
Key Feature: Conditional Logic for LFK Definitions
- Allows specifying conditions to determine which child records are affected.
- Particularly useful for child tables with polymorphic associations to the parent table.
Example Use Case
- Notes Table: Uses polymorphic associations to link to multiple parent tables, including the Vulnerabilities table.
- When a Vulnerability record is deleted, only Notes associated exclusively with that Vulnerability should be updated or deleted, leaving Notes linked to other tables unaffected.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #341515 (closed)
Edited by Schmil Monderer