Skip to content

fix: reordering draft documents causes data loss #12109

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

DanRibbens
Copy link
Contributor

Re-ordering documents with drafts uses payload.update() with select: { id: true } and that causes draft versions of those docs to be updated without any data. I've removed the select optimization to prevent data loss.

Fixes #12097

@DanRibbens DanRibbens merged commit e90ff72 into main Apr 15, 2025
81 checks passed
@DanRibbens DanRibbens deleted the fix/orderable-with-drafts branch April 15, 2025 16:09
@kristian240
Copy link

Awesome! This also means that we will get full doc in collection hooks too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Orderable deletes all data on collection with versions enabled
3 participants