drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
23.11k stars 562 forks source link

Allow referencing deeply nested properties in relational queries #696

Open dankochetov opened 1 year ago

Gerschtli commented 10 months ago

What is the status here? I would love to help implement this feature but TBH I am a bit overwhelmed with the code base and don't know where to start. If you @dankochetov or somebody else would like to give me some pointers or wants to discuss ideas, I am open for it :)

LukaHietala commented 7 months ago

Is there a good workaround for this issue?

LaRuaNa commented 7 months ago

Is there a good workaround for this issue?

Writing your own sql query I guess. ¯_(ツ)_/¯

Angelelz commented 7 months ago

The aliases generated by the RQB are consistent. One workaround would be to print the query to identify what is the data you'd like to reference and use that name. Maybe open a help thread in discord and I might be able to help a little bit.

bageren commented 1 month ago

@Angelelz Do you know if there's a way to use a column of a relation in the where clause?