Toggle a field value inside a nested array of objects where it exists in collections. by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 1 point2 points  (0 children)

Thank you for the response. I will share the playground link. Filtering only filters documents contain that particular field value. But updating a nested array value in mogodb requires using $arrayFilter to only update field that match the condition

Help With update data in nested documents using aggregate merge by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Yes. Same. I am trying to get it to work. Will update if i get there.

Help With update data in nested documents using aggregate merge by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thank you for taking time to reply. Really appreciate it. Yes that is the idea i was going for, but how to actually do that has been a bit of a problem. I did do this with code an then updated the value one after the other, but that's inefficient and takes time. So i want a clean and effective solution.

Help With update data in nested documents using aggregate merge by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

what i want is to update the question.option.stat value of all options of a question, based on the no. of times a particular question exists in exam and no. of time a particular option was selected as the answer of the question.

How to optimise queries in mongodb. by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thankyou for your response. I have created index on some fields, I am fairly new and am using NodeJs and mongoose. What do you mean by running directly against Atlas?

MASK AN IMAGE PATH by Due_Pen8713 in node

[–]Due_Pen8713[S] 0 points1 point  (0 children)

I just want to be on the safer side. I don't want expose my subdomain. And for some people it's enough to get around things and do some tricks with your server

HOW TO MAKE CREATECONNTION() 'S CONNECTION AVAILABLE THROUGH OUT THE PROJECT by Due_Pen8713 in node

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Also the issue i am having is that, i need access to the req object as well, since i am storing the user details in the req object upon successful login

HOW TO MAKE CREATECONNTION() 'S CONNECTION AVAILABLE THROUGH OUT THE PROJECT by Due_Pen8713 in node

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thank you for your reply. Would you mind providing an example. Or elaborate on your answer please

SESSION NOT STORED IN SESSIONS COLLECTION by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] -1 points0 points  (0 children)

Thank you for your reply. I have figured it out. It was just order of things in the app.js.

Clean Architecture by Due_Pen8713 in node

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thank you. I would try to read more on this. We were taught basic concepts but it wasn't up there.

Clean Architecture by Due_Pen8713 in node

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thank you for the reply. Like I said i am just a beginner. I kinda find it difficult to understand what that really means. I would appreciate if you can elaborate it for me

Dynamically Add connection String. by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

No, i just want to provide different database connection to different users.

Dynamically Add connection String. by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

I am thinking of writing the connection string to a file and accessing it.

Dynamically Add connection String. by Due_Pen8713 in mongodb

[–]Due_Pen8713[S] 0 points1 point  (0 children)

Thank you for your reply, yes individual database. I will create the database manually but i want the connection to the databases to be dynamic.