Open relsunkaev opened 11 months ago
I think this is the same as https://github.com/drizzle-team/drizzle-orm/issues/531
I think this is the same as https://github.com/drizzle-team/drizzle-orm/issues/531
That issue seems unrelated, at least to me.
Can you confirm this is still an issue?
Yep, still an issue as of 0.29.0
Ran into a somewhat similar issue on 0.29.3, @Angelelz. Made a simple repo that reproduces it.
I just took a look at the codebase and it seems to me that the select object that you define is not designed to be recursive and you are only allowed to one level of nesting. If anything, this should be a feature request, not a bug. The type error is correct in this case.
What version of
drizzle-orm
are you using?0.27.2
Describe the Bug
Not 100% sure if this is a bug or a feature request but the following query works and produces the desired result
but the types give the following error
Expected behavior
No typescript error and correct return type inference.
Environment & setup
No response