Insert or Update: Error undefined is not an object (evaluating 'col.name')
Hi, I'm trying to implement Insert or Update
I get this error:
Any idea what it means ?
15 Replies
Where do you get "users" from?
users is my table name
Okay so you do import users in the file where the function "insertOrUpdateUser" is?
Yes, it's in the same exact file
There is no TS Error at transpile time, the errors comes from within drizzle's module
Okay. We are doing this the exact same way and for us it is working. Thats why i was asking š
mmh
If I do that:
It works, that's puzzling
What version of drizzle-orm are you using?
"drizzle-orm": "^0.29.0",Oh, I think I know why
š I think there has to be a problem with your user object then
My user object has additional properties than columns in the database
And I think drizzle doesn't handle that
Thanks for your help
ā¤ļø
Yes that might be the case. We are using an object which only has the properties drizzle expects
I'll stick with this non-elegant solution while i'm working on integrating all user properties
You're welcome š
Have a great rest of your day ;)
You too!