Skip to content

v1.97.2 - Amadioha

Latest

Choose a tag to compare

@MichaelSowah MichaelSowah released this 03 Dec 21:42
ebca531

[1.97.2] - 2026-12-03 — Amadioha

Soft-delete filtering fixes for joins and aliased tables.

Fixed

  • Joining two soft-deletable tables no longer fails. The query builder's soft-delete filter
    wrote an unqualified deleted_at IS NULL, so joining another table that also has deleted_at
    (for example users and profiles) failed with "column reference is ambiguous" on PostgreSQL and
    SQLite. The filter now names the primary table: "users"."deleted_at" IS NULL.
  • An aliased primary table is filtered again. With an alias (table('users u') or
    table('users as u')) the filter looked for a deleted_at column on a table literally named
    users u, found none and skipped itself, so soft-deleted rows were returned. The alias is now
    split off: the column check uses the real table, and the predicate uses the alias
    ("u"."deleted_at" IS NULL). withTrashed() and onlyTrashed() behave the same way.
    Schema-qualified names without an alias (public.users) keep the unqualified predicate.