Open
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm
are you using?
0.41.0
What version of drizzle-kit
are you using?
0.30.6
Other packages
No response
Describe the Bug
What is the undesired behavior?
In this minimal ts-playground . We see r and r2 do not have the same resulting type. Both use nested select object syntax, one directly on a query, and the other on a pgView. The simple query returns the whole b table object as nullable, but not the id field, whereas the view makes the id field nullable, but not the b table object
What is the desired result?
Both should have the same type. As stated in the docs:
To avoid plethora of nullable fields when joining tables with lots of columns we can utilise our nested select object syntax, our smart type inference will make whole object nullable instead of making all table fields nullable!
So both should make the b object table nullable, not the id field