New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order by Relations with multiple references #7331
Comments
Candidating this one for next sprint to consider moving |
I can reproduce this with |
This issue also seems to occur in
|
Internal Note: Candidating it since it's one of our oldest preview features 2.16.0 and we should consider looking into this before we remove the preview flag |
Bug description
prismaClientUnknownRequestError2 [PrismaClientUnknownRequestError]: Invalidprisma.task.findMany() invocation: Error occurred during query execution: ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("42804"), message: "argument of JOIN/ON must be type boolean, not type record", detail: None, hint: None, position: Some(Original(383)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("parse_coerce.c"), line: Some(1156), routine: Some("coerce_to_boolean") }) }) }) at cb (/prisma-schema-orderby/node_modules/@prisma/client/runtime/index.js:35105:17) at processTicksAndRejections (internal/process/task_queues.js:93:5) { clientVersion: '2.23.0' }
How to reproduce
I prepare a simple project. There are 3 entities with composite keys. The last entity (TASK) has reference to Company and Project. I Can order tasks by Company_Name, but I cannot order them by Project_Name.
prisma-schema-orderby.zip
Expected behavior
Should order by Project_Name.
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: