Need help with InferSelectModel
As you see in the screenshot, I have a
booking
schema and creating types for them using InferInsertModel
. But when I hover over the CreateBooking type it shows only some columns from the booking table and most of the columns are missing. Any idea why it behave like this?
8 Replies
Can you show me your tsconfig.json file?

Try setting
strictNullChecks
to true
After setting
strictNullChecks
to true, the type issue from inferInsertModel was fixed. But I'm getting this error on inserting and returning the data.
Hmm, you may also need to set
strict
to true
. Try that/Tried it, but issue still exists
Hmm, there are a few other things you can try:
1. Change
target
in your tsconfig.json to be set to a more recent version.
2. Update ORM and Kit to the latest versionsI solved it, seems like there was an issue in my booking schema foreign key column. So I removed the unnecessary foreign key column and it works now