db-postgres: relationship field filterOptions returning unexpected results
Link to reproduction
https://github.com/JPrisk/payload/tree/postgres-relationships
Describe the Bug
This is a repeat of this issue except i've created a new reproduction because @PatrikKozak was having difficulty reproducing the issue
To Reproduce
The following steps require you to run pnpm dev _community with your PAYLOAD_DATABASE environment set for the following options:
MongoDB
- navigate to
http://localhost:3000/admin/collections/posts - navigate to the post titled "example post 2 [published]"
- click the "Related Posts" dropdown
- observe
[draft]posts being filtered from the results
Postgres
- navigate to
http://localhost:3000/admin/collections/posts/2 - click the "Related Posts" dropdown
- observe
[draft]posts being included in the results
Payload Version
latest
Adapters and Plugins
db-postgres
very likely a duplicate of #5151
Hey @JPrisk - issue #5151 has been closed with this PR.
And thank you for the above reproduction! With your reproduction and using the postgres adapter, I'm observing that drafts are being filtered out.
Can you confirm with latest if you are still experiencing this?
Hey @PatrikKozak - thanks for releasing the fix, yes this can now be closed ✅
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.