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?
No description
8 Replies
Mario564
Mario5642w ago
Can you show me your tsconfig.json file?
manikandan
manikandanOP2w ago
No description
Mario564
Mario5642w ago
Try setting strictNullChecks to true
manikandan
manikandanOP2w ago
After setting strictNullChecks to true, the type issue from inferInsertModel was fixed. But I'm getting this error on inserting and returning the data.
No description
Mario564
Mario5642w ago
Hmm, you may also need to set strict to true. Try that/
manikandan
manikandanOP2w ago
Tried it, but issue still exists
Mario564
Mario5642w ago
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 versions
manikandan
manikandanOP2w ago
I 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

Did you find this page helpful?