Peter Amiri
05/11/2026, 3:31 AMCreateObject("java", ...) that bypassed the ORM, the background job enqueued from a request that never asked "whose job is this?"
• Three deployment models supported. Separate database per tenant (cleanest isolation, GDPR erasure = DROP DATABASE), shared database with separate schema (middle ground), shared database with row-level scoping (most discipline required). Pick by isolation requirement, not framework limit.
• Tenant context restored on the worker side. A job enqueued in tenant A's request runs against tenant A's datasource when the worker picks it up — no tenant_id in payload, no with_tenant(...) wrapper.
Pairs naturally with yesterday's post on the DB-backed queue — tenant-aware enqueueing falls out of this resolver design.
Honesty clause from the post: don't use it for admin / ops consoles or cross-tenant reports. Those need a deliberate system datasource. The framework makes the right thing easy; it doesn't make the cross-cutting thing impossible.
<Read the full post>