You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related issue: #8077
When enabling versions with drafts and using the draft:false argument in find/findById operations, it's expected to only return published documents.
Yet the operation returns the latest published document OR the latest unpublished document if no published documents exist.
The solution provided in the github issue is to add a where clause to check for status field equals published.
This negates the effect of drafts imo, and I fail to see it's use-case in a production environment. (I either want only published documents or only latest version regardless of status)
Documentation Issue
Related issue: #8077
When enabling versions with drafts and using the draft:false argument in find/findById operations, it's expected to only return published documents.
Yet the operation returns the latest published document OR the latest unpublished document if no published documents exist.
The solution provided in the github issue is to add a where clause to check for status field equals published.
This negates the effect of drafts imo, and I fail to see it's use-case in a production environment. (I either want only published documents or only latest version regardless of status)
Can this be added to the docs, for example in https://payloadcms.com/docs/versions/drafts#reading-drafts-vs-published-documents?
The text was updated successfully, but these errors were encountered: