Alias join doesn't seem to work

I have a simple alias:
const parent = aliasedTable(contact, "parent")

let res = await db.select().from(policy).leftJoin(parent, eq(parent.id, policy.parent_id))
const parent = aliasedTable(contact, "parent")

let res = await db.select().from(policy).leftJoin(parent, eq(parent.id, policy.parent_id))
the query code works fine, but I cannot access the aliased name in the res. it is still inferring as contact , but the docs show it inferring as parent in the res.
1 Reply
Angelelz
Angelelz9h ago
can you share your tsconfig.json?
Want results from more Discord servers?
Add your server