typeof table.$inferInsert isn't returning all properties?
I upgraded from .31.2 to .36 today, and now I'm getting type errors. I think this image explains it best, but what I have is a calendar schema. I have a NewCalendar type but as you can see it is only picking up the
user_id
and nothing else.
This means that any insert/update I'm trying to do it failing because I'd be trying to set summary, for example, and it isn't on the type.
I looked through the release notes and didn't see anything about this. Any ideas?3 Replies
After playing around, the only propeties that show on the type are the ones that end with .
notNull
It doesn't matter that created_at has a notNull
in the definition, it has to end with it. is this a bug?Found this - seems related. I guess it is a known bug https://github.com/drizzle-team/drizzle-orm/issues/2889#issuecomment-2407712651
GitHub
[BUG]: Type inference error on db.insert() when applying default va...
What version of drizzle-orm are you using? 0.33.0 What version of drizzle-kit are you using? 0.24.0 Describe the Bug When trying to insert into a table via db.insert(schema.table).values( {} ), the...
I never don't use
strict: true