Multi-tenancy

Row references another tenant

Why it happens

Schema checks only object id, not tenant ownership.

Potential bug

Queries or cascades cross the isolation boundary.

Mitigation

Use composite tenant foreign keys and derive tenant from authenticated context.

See it in context