Hi here !
I would like to update a document with fields containing periods
`{_id: 1, a: {b.c: {d:42}}}``
How to update the value of d
from 42 to 43?
Thank you for your help!
Hi here !
I would like to update a document with fields containing periods
`{_id: 1, a: {b.c: {d:42}}}``
How to update the value of d
from 42 to 43?
Thank you for your help!
Start by looking at $setField.
In the future, I would try to avoid fields with dots. I don’t even know if you could have an index on b.c within a:.
Topic | Replies | Views | Activity |
---|---|---|---|
Data collection sctructure schema | 1 | 297 | May 2024 |
Aggregation on currentOp | 0 | 307 | May 2024 |
$group aggregation on array fields is not covered by MultiKey index | 4 | 374 | Jun 2024 |
How to implement the idempotent consumer pattern with MongoDB? | 2 | 166 | Oct 2024 |
Dynamically changing KMS provider and rewrapping DEKs | 1 | 26 | Mar 25 |