$returningId() can not read properties of undefined id
Hey everyone! 
I’m running into an issue with onDuplicateKeyUpdate and $returningId(). I keep getting an error:
“Cannot read properties of undefined (reading ‘id’)”
I use drizzle with mysql (Planetscale)
Here’s the relevant snippet:
What I expect this to do:
Thanks in advance for any tips or pointers!
I’m running into an issue with onDuplicateKeyUpdate and $returningId(). I keep getting an error:
“Cannot read properties of undefined (reading ‘id’)”
I use drizzle with mysql (Planetscale)
Here’s the relevant snippet:
What I expect this to do:
- Insert a new row into schema.category with whatever is in data.
- If there’s a duplicate key, update the existing row’s id column to the same value .
- Return the id of the inserted or updated row. Instead, I’m hitting the runtime error.
Thanks in advance for any tips or pointers!