Unbreakable self reference relationship

A table has been found with a non-nullable self-reference relationship. This creates a circular dependency that prevents proper subsetting.

Why this is a problem

Self-referencing tables with non-nullable foreign keys create unbreakable chains - every row requires another row from the same table to exist, making it impossible to subset partial data while maintaining referential integrity.

How to fix

Choose one of these approaches:

Option 1: Exclude the problematic table

Add the table to your excluded tables list:

{
  "excludedTables": [
    {
      "schema": "dbo",
      "name": "Categories"
    }
  ]
}

Option 2: Make the relationship nullable (database change)

Modify the database schema to allow NULL values in the self-referencing foreign key column.

Warning: This requires a database schema change and may impact your application logic.

Common examples

Category hierarchies: Categories table with non-nullable ParentCategoryId

Employee management: Employees table with non-nullable ManagerId

Organizational structures: Departments table with non-nullable ParentDepartmentId





Didn't find what you were looking for?