Declare base tables explicitly when aliasing raw ORM subqueries
In SQL builders that interpolate aliased table objects into raw fragments, never assume an alias object renders a valid FROM source. Some builders emit only the alias identifier, producing a query against a nonexistent relation. Declare the physical table together with its alias,…