Hi @shainegordon

Try doing:

const queryResult = await prisma.queryRaw('select * from "public"."Client"');
🌐
GitHub
github.com › prisma › prisma › issues › 7335
thread '<unnamed>' panicked at 'assertion failed: `(left == right)` · Issue #7335 · prisma/prisma
May 28, 2021 - PrismaClientKnownRequestError2 [PrismaClientKnownRequestError]: Invalid `prisma.queryRaw()` invocation: Raw query failed. Code: `42P01`. Message: `relation "customer" does not exist` at cb (/xxx/.pnpm/@prisma+client@2.23.0/node_modules/@prisma/client/runtime/index.js:35101:17) at Object.queryRaw (/xxx/xxx/packages/orm/prisma/src/index.ts:27:15) at fun (/xxx/xxx/packages/cli/src/benchmark.ts:38:19) at /xxx/.pnpm/p-map@4.0.0/node_modules/p-map/index.js:57:22 { code: 'P2010', clientVersion: '2.23.0', meta: { code: '42P01', message: 'relation "customer" does not exist' } } Query: select * from cus
Author   prisma
Discussions

Prisma $queryRaw cannot grab any tables added from migration
Hey there, I have a web app I’ve been working on, on Redwood v0.31.0 I have a few tables such as ‘Tournaments’ and ‘User’, and everything works great with the general db operations via prisma. Having said that, I have some calls I need to do that need raw sql access (such as checking ... More on community.redwoodjs.com
🌐 community.redwoodjs.com
1
0
June 6, 2021
Is there any way to filter by whether a relation exists or not?
Update: this is now covered quite thoroughly in the docs For the following model I want to run a query to get all the bookings that don't have any visits: model Booking { visits Visit[] } Previ... More on github.com
🌐 github.com
5
6
(Error) .. message: "relation "prisma-hello.User" does not exist"
Created a basic setup, following the Prisma2 docs and tutorial, however, I get the Error mentioned in title. (full output below) project.prisma: datasource db { provider = "postgresql" ur... More on github.com
🌐 github.com
8
July 6, 2019
How do I query for where relationship does _not_ exist?
How do I query for where relationship does _not_ exist? More on github.com
🌐 github.com
2
1
🌐
Prisma
prisma.io › home › relation queries › relation queries › relation queries › relation queries
Relation queries (Concepts) | Prisma Documentation
If you want to create all records in a single database query, consider using a $transaction or type-safe, raw SQL. You cannot access relations in a createMany() or createManyAndReturn() query, which means that you cannot create multiple users and multiple posts in a single nested write. The following is not possible: const createMany = await prisma.user.createMany({ data: [ { name: "Yewande", email: "yewande@prisma.io", posts: { // Not possible to create posts!
🌐
RedwoodJS Community
community.redwoodjs.com › get help and help others
Prisma $queryRaw cannot grab any tables added from migration - Get Help and Help Others - RedwoodJS Community
June 6, 2021 - Hey there, I have a web app I’ve been working on, on Redwood v0.31.0 I have a few tables such as ‘Tournaments’ and ‘User’, and everything works great with the general db operations via prisma. Having said that, I have some calls I need to do that need raw sql access (such as checking number of relations and comparing that with a number in the record that indicates max relations allowed).
🌐
Prisma
prisma.io › home › raw queries › raw queries › raw queries › raw queries
Raw queries | Prisma Documentation
Note: If you do not provide a type, $queryRaw defaults to unknown. If you are selecting specific fields of the model or want to include relations, refer to the documentation about leveraging Prisma Client's generated types if you want to make sure that the results are properly typed. When you type the results of $queryRaw, the raw data might not always match the suggested TypeScript type.
Find elsewhere
🌐
Prisma
prisma.io › home › orm › prisma schema › data model › relations › troubleshooting relations
Troubleshooting relations | Prisma Documentation
Take the following example, here a relation table is created to act as the JOIN between the Post and Category tables. This will not work however as the relation table (PostCategories) must form a 1-to-many relationship with the other two models respectively.
🌐
GitHub
github.com › prisma › prisma › issues › 107
(Error) .. message: "relation "prisma-hello.User" does not exist" · Issue #107 · prisma/prisma
July 6, 2019 - ─➤ npm start > hello-prisma@1.0.0 start /Users/ScottAgirs/../starters/hello-prisma > ts-node index.ts [Got in] index.ts [photon.connected in] index.ts (node:8492) UnhandledPromiseRejectionWarning: Error: Error in Photon: [ { "error": "ConnectorError(QueryError(Error { kind: Db, cause: Some(DbError { severity: \"ERROR\", parsed_severity: Some(Error), code: SqlState(\"42P01\"), message: \"relation \\\"prisma-hello.User\\\" does not exist\", detail: None, hint: None, position: Some(Original(13)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: So
Author   prisma
🌐
RedwoodJS Community
community.redwoodjs.com › get help and help others
Prisma queryRaw throws error when using template string variable in table name - Get Help and Help Others - RedwoodJS Community
April 14, 2022 - Below are what I have tried, let ... throws the following error. Invalid `prisma.queryRaw()` invocation: Raw query failed. Code: `42P01`. Message: `relation "$1" does not exist` Below are Prisma logs from two queryRaw runs. {"level":20,"time":1649915257507,"pid":613...
🌐
Prisma
prisma.io › home › relation mode › relation mode › relation mode › relation mode › relation mode
Manage relations between records with relation modes in Prisma | Prisma Documentation
Emulation of relations is only available for Prisma Client queries and does not apply to raw queries. When you update a record, Prisma ORM will emulate foreign key constraints. This means that when you update a record with a relation to another ...
🌐
GitHub
github.com › prisma › prisma › issues › 22299
relationJoins: "The table `(not available)` does not exist in the current database." · Issue #22299 · prisma/prisma
December 7, 2023 - Bug description Updated Prisma from v5.4.2 to v5.7.0 to test out the "relationJoins" preview feature. Most queries work as expected but there was one that gave me this error when executing a findMany operation: The table `(not available)...
Author   prisma
🌐
GitHub
github.com › prisma › prisma › issues › 18271
Column appears to not exist with specific name. · Issue #18271 · prisma/prisma
March 9, 2023 - Bug description I have a model with a field called groupId. When I try to access it via queryRaw, it says it doesn't exist. If i change the field to group it appears to exist. How to reproduce ...
Author   prisma
🌐
Stack Overflow
stackoverflow.com › questions › 73359920 › according-to-prisma-the-referenced-column-does-not-exist-in-the-database-but-t
mysql - According to Prisma, the referenced column does not exist in the database, but the client is created without any problems - Stack Overflow
I see that this error says that the OwnerID column does not exist in the table, which is true, this column only exists in the schema because the field is referenced. But in the database, the column "Owner" already has an FK relationship. Do I really have to create a new column in the database just so that Prisma can deal with it? ... Hi, of course! The query: const matchingOrg = await client.organization.findUniqueOrThrow( {where: {LoginScheme: scheme.toLowerCase()}});
🌐
GitHub
github.com › prisma › prisma › issues › 13517
SQL joins without relations/foreign keys/raw query · Issue #13517 · prisma/prisma
May 27, 2022 - My Transaction and SmartContract table are backfilled async to each other, so it's possible that the SmartContract for a given Transaction may not exist yet in the table (hence one cannot create a foreign key constraint). It's useful to be able to perform joins, hopefully with prisma's typed query methods.
Author   prisma
🌐
New Releases
newreleases.io › project › github › prisma › prisma › release › 3.14.0
prisma/prisma 3.14.0 on GitHub
May 10, 2022 - referentialIntegrity = prisma: Broken query on onUpdate: Cascade | symbol ... not found | The column ... does not exist in the current database. Getting a "Raw query failed. Code: N/A. Message: error deserializing column 0: a Postgres value was NULL``" error when using Postgres ARRAY_AGG with a nullable column · Planetscale not able to upsert with Prisma · connectOrCreate deletes old relation and creates a new one ·