Skip to content
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

Breaking: MongoDb - Versions cast the "parent" key incorrectly #6349

Open
apetrisor opened this issue May 14, 2024 · 0 comments
Open

Breaking: MongoDb - Versions cast the "parent" key incorrectly #6349

apetrisor opened this issue May 14, 2024 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@apetrisor
Copy link

apetrisor commented May 14, 2024

Link to reproduction

No response

Describe the Bug

On a collection with number ids, when creating new versions of a document, the parent key will be either Number or String, it is not consistent. It causes several versions of the same document to appear in the collection view, but more importantly it causes Drafts and Published versions to malfunction.

This is not the same as #5355.

I have a working patch in production, will submit a PR.

To Reproduce

  1. Create a collection with Number IDs and versions active.
  2. Create a document
  3. Create a new version for that document
  4. Inspect the database. There is a high chance the version's parent key is String. I've had both Number and String in my tests.

Payload Version

2.16.1

Adapters and Plugins

db-mongodb

@apetrisor apetrisor added the status: needs-triage Possible bug which hasn't been reproduced yet label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant