#'Syntax error at position 9' with prisma v5.10.1 and @prisma/adapter-planetscale

1 messages · Page 1 of 1 (latest)

spice crater
#

I am getting this error after I upgraded from v5.7.1 to v5.10.1. No other changes have been made.

When enabling query logging I can see that the query causing this error is

SELECT ``.`User`.`id`, ``.`User`.`onboarded` FROM ``.`User` WHERE ``.`User`.`id` = ? LIMIT ? OFFSET ?

When I try to run this query in the PlanetScale Console, it throws the exact same error of syntax error at position 9 which leads me to believe that these backticks (i think the second backtick is at position 9) are somehow causing the error. Some googling does not reveal an answer.

I am not using $queryRaw or $executeRaw anywhere in my source.

Any easy solution that I'm missing, or is this a bug in Prisma itself

spice crater
#

Update: I reverted back to 5.7.1 to see if I could find what the correct query could be and it seems to be

SELECT `main`.`User`.`id`, `main`.`User`.`onboarded` FROM `main`.`User` WHERE `main`.`User`.`id` = ? LIMIT ? OFFSET ?

so somewhere in Prisma it is losing what the table name is.

trail wyvern
#

Hey @spice crater 👋
To make sure I understand this issue correctly, this query works as expected in 5.7.1, but throws error when you upgrade to 5.10.1, correct?

spice crater
#

also occurs on 5.8 and 5.9

trail wyvern