How do I join the tables of two columns, if both of them point to the same table?
Given the following schema:
How do I join the media tables on the potential duplicate table? I want both of them to be present in the result. According to the docs (https://orm.drizzle.team/docs/joins#aliases--selfjoins) I can use aliased tables, but that does not seem to work. Here is my example:
If I try to auto complete on
x
I get the tables media and potential duplicate. It seems like both media tables got the name Media, which is wrong.Drizzle ORM - Joins
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
0 Replies