Hey guys, shouldn't raw queries still work with th...
# orm-help
e
Hey guys, shouldn't raw queries still work with the schema file? I'm having issues when writing a raw query using the model/fields names, if I use the table/mapped fields names it works. If I understand correctly this doc, model names and fields names should work correctly (https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access), or raw query is a 100% raw query and I misunderstood the doc?
j
Raw is indeed raw, we can jus try to stuff them into existing types.
What made you think the schema naming would be observed? Maybe we could clarify some things.
e
Hey @janpio thanks for answering. I'm just probably confused. I saw the
model Post
but I don't see a @@map, meaning that the table is named 'Post' (with an uppercase P). I also saw under $executeRaw the
emailValidated
field (camelCase), but right now I'm guessing the field itself is written like that in the table structure, which I don't know if it is possible due to my lack of knowledge.
j
If there are not
@map
or
@@map
I would expect the table itself to really be named like that indeed.