Questions tagged [mongo-collection]
110 questions
0
votes
1 answer
Connecting Remote MongoDB in PHP to get the results in collection
Hi Can anyone help with me for Configuring the mongodb in PHP with below details,
I have tried connecting with below MongoServer details and get the results from the collections, But I am getting error as shown below
Server : test.server.com
Port :…

Mahesh G
- 1,226
- 4
- 30
- 57
0
votes
1 answer
MongoCollection update where a value is equal to something
I am trying to update a value in my entire DB for every meeting I have. Currently it looks like this:
{
"Referent" : null
"Participants" : [
{
"Email" : "mail@mail1.com",
"Present" : true
},
…

MortenMoulder
- 6,138
- 11
- 60
- 116
0
votes
2 answers
Mongo collection in Meteor is inserting junk
I'm trying to create a Mongo collection that can be inserted into from client side. When I call Courses.insert it succeeds, but is putting junk fields into my collection.
Code:
/imports/api/createCourse.js
import { Meteor } from…

Brian Sizemore
- 249
- 4
- 17
0
votes
1 answer
Meteor: There is no route for the path error. how to access SINGLE article within a nested object
I have an array of 10 objects 'categories' and each category has sub objects such as posts within that category. This is how it looks.
I access the category list like this.
{{#each articles}}

Shingai Munyuki
- 551
- 1
- 11
- 25
0
votes
1 answer
Meteor: single post view, via id and flow router is not parsing any data from the collection
Im trying to open a single record from my #each loop of items into its own view by clicking a link that says 'see more', which will take me to the single article. I set up my Flow router and its working but i cannot see the data that's supposed to…

Shingai Munyuki
- 551
- 1
- 11
- 25
0
votes
1 answer
Fetch from collection on visiting route using FlowRouter doesn't work on page reload
I have a route defined in my Meteor + React app like this below. I would like to fetch the post and pass into component via props. But I get an error saying post is undefined when I reload the page when on that URL. I can visit the URL when I go…

trevligheten
- 306
- 2
- 13
0
votes
1 answer
Mongo Query Performance
playing with MongoChef i discovered that the queries are getting slower with the time and with the amount of documents in a collection.
EX: I Started an app in November last year and from that time i'm saving data into mongo DB in the same…

Miton Leon
- 274
- 1
- 5
- 15
0
votes
1 answer
cannot be cast to org.bson.BSONObject
I try to make this program but I get this error
cannot be cast to org.bson.BSONObject
I don't know if the structure of the program is fine. I want to do a program to search in the database (mongoDB) and print me all the events, but when I have a…

William
- 33
- 1
- 10
0
votes
1 answer
Using mongodb with java
I'm searching in the database for the URL but with this code I can not. Why? Normally I want to print all the type and the URL where exist in this database. When I have the print only with the type is working but with the print for URL…

William
- 33
- 1
- 10
0
votes
1 answer
Mongo Get collection names function db.getCollectionNames() is Not working in sharding
I was getting all collection names by function db.getCollectionNames().
But as soon as I started sharding, function db.getCollectionNames() is Not working.
How to get all collection names in database when sharding is active?

Somnath Muluk
- 55,015
- 38
- 216
- 226
0
votes
1 answer
Meteor : passing router parameter to get Collection data without results
I'm fairly new to meteor and have encountered a problem while trying to use Iron Router to pass a url parameter to a Collection and retrieve some data for display.
Specifically, I have a Collection with events and I'd like to have a page that…

Michiel
- 709
- 9
- 15
0
votes
1 answer
How can I update/insert into a nested Array using MongoCollections updateOne method?
Here's a simplified example of the document
{
"username":"someUsername",
"bank":[
{
"item_id":45,
"item_amount":10
},
{
"item_id":45,
"item_amount":10
}
]
}
How can I…

CamHart
- 3,825
- 7
- 33
- 69
0
votes
2 answers
MongoDB Matches query building
my users collections will have data like this
{ name:"steve" }, { name:"david" }, { name:"sana" }, { name:"robert" }
My query is like this
var myCollections= _database.GetCollection("users");
var query = Query.Matches("name", "Steve…

HaBo
- 13,999
- 36
- 114
- 206
0
votes
1 answer
Perl mongo->collection count using '$in' operator
I was wondering if it was possible to use the "in" operator as you can from the mongo shell, using the perl MongoDB::Collection module. I have tried a number of things, but haven't quite got the result I am expecting. I've check the docs and other…

user2924781
- 3
- 1
0
votes
1 answer
update a property of field in a mongodb collection
I have a collection Task in which I have a field title as unique = True, but due to latest requirement this unique = True has to be removed, i.e. it has to be set as False.
Is there a way to do this ?
Ofcourse I don't want to drop my collection.

Somesh
- 1,235
- 2
- 13
- 29