I keep getting db error could not determine data t...
# orm-help
j
I keep getting db error could not determine data type of parameter $1 when i use the same SQL code (without the javascript injection) using my DATAGRIP program, it works. im not sure why im getting this error with prisma
Copy code
await prisma.$queryRawUnsafe`UPDATE table SET template_json_data = jsonb_set(template_json_data, '{namingConvention}', '"${String(req.body.projectName)}"', false) WHERE save_id = ${Number(req.body.saveId)}`;
if i use this using DATAGRIP it works:
Copy code
UPDATE table SET template_json_data = jsonb_set(template_json_data, '{namingConvention}', '"New info to be updated"', false) WHERE save_id = 22
n
Can you update to
@prisma/client
version 3.14.0? We have made some improvements in queryRaw. Here are the release notes 3.14.0 which describes how you could enable it. Also, which database are you using? You might need to add schema name before the table name, can you do that and check?