Enumerates every SINGLE-column FK within the MJ core schema (parent + child both in mjSchema).
Composite FKs (a constraint spanning >1 column) are excluded and warned — Entity references
are all single-column, so this is safe. The catalog query comes from the provider's dialect
(SQLDialect.ForeignKeyGraphSQL), so this works on both SQL Server and PostgreSQL; the
normalized row shape (parentTable, parentRefCol, childTable, childCol, childNullable, fkName, colCount) is identical across dialects.
LIMITATION: the query filters BOTH ends to mjSchema, so a FK from a table in ANOTHER schema
into mjSchema.Entity is not enumerated. Such a cross-schema dependent would still FK-block the
final Entity delete → clean XACT_ABORT/transaction rollback, removal reported as failed
(nothing partially deleted). Accepted as rare; documented so the next person who hits it knows why.
Enumerates every SINGLE-column FK within the MJ core schema (parent + child both in
mjSchema).Composite FKs (a constraint spanning >1 column) are excluded and warned —
Entityreferences are all single-column, so this is safe. The catalog query comes from the provider's dialect (SQLDialect.ForeignKeyGraphSQL), so this works on both SQL Server and PostgreSQL; the normalized row shape (parentTable, parentRefCol, childTable, childCol, childNullable, fkName, colCount) is identical across dialects.LIMITATION: the query filters BOTH ends to
mjSchema, so a FK from a table in ANOTHER schema intomjSchema.Entityis not enumerated. Such a cross-schema dependent would still FK-block the finalEntitydelete → cleanXACT_ABORT/transaction rollback, removal reported as failed (nothing partially deleted). Accepted as rare; documented so the next person who hits it knows why.