All Questions
6
questions
0
votes
1
answer
36
views
problems to update mongodb collection
so I have two different collections for my social media app. One for the users and the other one for the user's posts. Whenever I'm updating the info from one of my user's collection it should also ...
0
votes
1
answer
685
views
Mongoose adding product to Cart products array
I've been trying to figure out how to push new product to existing cart which I have in my database.
updateOne is searching for a a cart with claimed userId and then ties to insert new product into ...
1
vote
1
answer
3k
views
how do I fix this problem I'm having with findOneAndUpdate
Trying to update mongodb doc using findOneAndUpdate method
tried looking up the doc in various ways and reformating the update in different ways
router.put(
"/edit",
[
auth,
[
...
0
votes
1
answer
241
views
Right usage of MongoDB update functions in Javascript
I have a probably simple problem using the MongoDB API for updating a document. I have tried several things but nothing was successful. Inserting and deleting in contrast work fine.
So what am I ...
0
votes
2
answers
5k
views
Update a field, depending on another field, in MongoDB documents (with Mongoose in Node.js)
I have a collection named Article in MongoDB database, with the following schema and model:
var articleSchema = new Schema({
site: String,
date: String,
day: String,
link: {
type: ...
12
votes
3
answers
27k
views
Add a field to existing MongoDB document (with Mongoose in Node.js)
I have this existing document in a collection Article in MongoDB database:
[ { site: 'www.atlantico.fr',
date: '2014-05-27T11:10:19.000Z',
link: 'http://www.atlantico.fr/example.html',
_id: ...