[BUG]: type obtained with $inferInsert is empty
Problem
What version of `drizzle-orm` are you using? 0.32.0 What version of `drizzle-kit` are you using? 0.23.0 Describe the Bug I defined a users table in my drizzle schema, and the NewUser type obtained with users.$inferInsert is empty: Expected behavior NewUser type should have most of the users table properties. Environment & setup Fedora Linux node-postgres typescript: 5.5.3
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [BUG]: type obtained with $inferInsert is empty
I'm having this issue and then some: - `$inferInsert` only provides fields that are `notNull()` or generated by default - `$inferSelect` does not respect nullability of fields and the type has every field as required Also on 0.32.0 orm & 0.23.0 kit
Trust Score
5 verifications
- 1
I'm having this issue and then some:
I'm having this issue and then some:
- 2
`$inferInsert` only provides fields that are `notNull()` or generated by default
- `$inferSelect` does not respect nullability of fields and the type has every field as required
- 3
Also on 0.32.0 orm & 0.23.0 kit
Also on 0.32.0 orm & 0.23.0 kit
Validation
Resolved in drizzle-team/drizzle-orm GitHub issue #2636. Community reactions: 11 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep