payload icon indicating copy to clipboard operation
payload copied to clipboard

Filter "is not equal to" does not work for relationship field

Open sagdeev opened this issue 1 year ago • 2 comments

Link to reproduction

No response

Describe the Bug

The filter "is not equal to" in the table does not work for fields with relationship. But filter "is not in" works fine.

To Reproduce

  1. Create relationship field in collection
  2. In list view try to use filter "is not equal to" for field with relationship

https://github.com/payloadcms/payload/assets/8946162/b3eda337-b025-4000-bcc8-d9a0b19f4a74

Payload Version

2.16.1

Adapters and Plugins

No response

sagdeev avatar May 09 '24 13:05 sagdeev

Hey @sagdeev, are you using the db-postgres adapter?

JPrisk avatar May 13 '24 22:05 JPrisk

Hi! Sorry, I forgot to specify. I use db-mongodb

sagdeev avatar May 20 '24 13:05 sagdeev

Hey @sagdeev - after some testing on my end, the is not equal to operator on relationship fields seems to be working as expected.

I had some trouble watching the full extent of your video but based on the first 10 seconds of the video, the operator seems to be working as intended.

When you input 123, the query filtered out document 123 and only showed 456 - that is what I would expect to happen when using the is not equal to operator.

Were you expecting a different outcome?

PatrikKozak avatar Jul 31 '24 17:07 PatrikKozak

@sagdeev Is this on a nested relationship field?

Could you send me your configs so I can test with your exact setup please? Thank you!

PatrikKozak avatar Aug 01 '24 12:08 PatrikKozak

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Sep 06 '24 22:09 github-actions[bot]