$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:
1. Insert a new row into ā schema.category with whatever is in ā data.ā©
2. If thereās a duplicate key, update the existing rowās ā id column to the same value . 3. Return the ā id of the inserted or updated row. Instead, Iām hitting the runtime error. What could be going wrong? Thanks in advance for any tips or pointers! š
2. If thereās a duplicate key, update the existing rowās ā id column to the same value . 3. Return the ā id of the inserted or updated row. Instead, Iām hitting the runtime error. What could be going wrong? Thanks in advance for any tips or pointers! š
0 Replies