Combined filters bug
See original GitHub issueBug description
I would expect these two filters would be the same:
{
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds },
OR: [
{
collaborators: {
some: {
userId: user.id,
type: type === 'write' ? CollaborationType.WRITE : undefined,
},
},
},
{
workspace: {
members: {
some: { userId: user.id, role: { not: WorkspaceRole.GUEST } },
},
},
},
],
}
{
OR: [
{
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds },
collaborators: {
some: {
userId: user.id,
type: type === 'write' ? CollaborationType.WRITE : undefined,
},
},
},
{
id: typeof typebotIds === 'string' ? typebotIds : { in: typebotIds },
workspace: {
members: {
some: { userId: user.id, role: { not: WorkspaceRole.GUEST } },
},
},
},
],
}
But the first one fails. Is it expected? Am I missing something?
How to reproduce
Combine a field filter with an OR filter
Expected behavior
No response
Prisma information
Not relevant
Environment & setup
- OS: MacOS
- Database: PostgreSQL
- Node.js version: 14
Prisma Version
3.12.0
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Chaining multiple filter() in Django, is this a bug?
Multiple filter ()'s AND together when fields are on the same model, but then OR together when spanning relationships. – gerdemb. Nov 17,...
Read more >Bug #431271 “crash after 'undo/redo' a (combined) filter effect ...
After the first crash, Inkscape no longer displays any image used in a new image filter without resetting 'preferences.xml'. console messages: terminate called ......
Read more >Content pane + combined filters causes views "Illegal Choice" error ...
When using BEF in a "content pane" view with a full pager and combined filters, you get an error when switching pages.
Read more >BUG : Combined Field filter ignores custom separator
BUG : Combined Field filter ignores custom separator. Tested in v.10.1.0. I have 2 dimensions: - FY (Financial Year) text datatype with ...
Read more >Multiple Filter Not Working Properly - Power Platform Community
An Unexpected Error has occurred. Top Solution Authors (Last Month) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for investigating. Here is the partial DB schema:
Hi @baptisteArno I tried to reproduce your bug and I am confussed, with the schema provided in the current version (3.15) the generated queries for PostgreSQL are equivalent 😐
I will close this ticket, but please try with the latest version and if the problem persist, open the ticket and share the specific JS query you are trying (I tried using a query over
Typebot
) and I will take a look at it again.