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
Fields are ignored in WHERE clause #3985
Comments
Are you sure the query you posted is the only query generated by your code? It could be that Prisma selects the ids with the correct where clause before and then does another query which only filters by those ids. |
@P4sca1 Select (from another table |
@P4sca1 You were right there is a select, but the issue still remains, |
If only |
I can confirm this, looks like value of Reproduction: https://github.com/harshit-test-org/prisma-issue-3985 |
This comment has been minimized.
This comment has been minimized.
@matthewmueller This is unrelated to the date format. This related to client generating the wrong query which is sent to the engine. When using
But when you pass ISO date string to the client
So there is a bug in client query generation. cc/ @timsuchanek |
For completeness: I can't reproduce the behavior on the engine side with correct inputs. |
* master: fix: bump engines (#4264) fix(client): fix prisma/prisma-client-js#585 (#4255) chore(deps): update devdependencies (non-major) fix(client): fix #4222 (#4256) fix(client): fix #3985 (#4254) chore: renovate add back "rangeStrategy": "bump" feat(client): introduce Prisma namespace (#4171) chore(deps): update studio to v0.312.0 (#4242) fix(scripts): Use `@prisma/studio` to compute version of Studio (#4241) fix(migrate): snapshot for last commit fix(migrate): small typo fix(deps): update engines to v2.12.0-2.b85f340def406de3f3bf42ab360423b2217f4eab chore: cleanup old non-$ methods (#4234)
Bug description
We use the following model for a table with uniq compound key by
employeeId
&paymentDate
Queries like
findFirst
,findMany
,updateMany
(maybe some other, haven't check yet) ignore some fields in a where clause.Query examples:
The output from logging is the following
From the log fields
status
,paymentDate
,publishedAt
are missed from WHERE clauseExpected behavior
Fields which are in a where clause should not be ignored.
Environment & setup
The text was updated successfully, but these errors were encountered: