Collection table data not showing updated when editing mongo directly #4503
Replies: 3 comments 1 reply
-
Okay, since you mentioned you have versions enabled, I know what is going on. The list view is displayed by querying a secondary collection that is named from your collection slug, prefixed with You might want to update inventory using the Paylaod local API, you will have to read and update the document to increment the stock in code. The upside is that your versions will be updated in the database as one might expect. If you don't care about maintaining the version history of the stock value specifically, you could maintain both collections versions and collection how you have done it. You can access the latest version for a document by querying on the I am going to convert this issue to a discussion since there isn't anything to fix at this time. |
Beta Was this translation helpful? Give feedback.
-
Hey there, just to note, I got this as an announcement on GitHub. Is this intended? |
Beta Was this translation helpful? Give feedback.
-
@TheTimeWalker I think it was a mistake. |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
No response
Describe the Bug
I have a query in an order collection that changes my stock for inventory items using $inc
The fields are updated correctly when looking at the edit form for that collection item, but the data is showing the previous value when looking at the list of collection items.
Is there some extra step I need to take to fully commit that change?
To Reproduce
Enable versions, then edit mongo data directly.
Payload Version
2
Adapters and Plugins
No response
Beta Was this translation helpful? Give feedback.
All reactions