Tagged Questions
MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms. Questions about administrating it can be asked on dba.stackexchange.com
-2
votes
0answers
7 views
Aggregate group by matching fields
I have the following results which have been created with aggregation:
{
"result" : [
{
"_id" : 1,
"zipcode" : 63109,
"students" : {
...
0
votes
0answers
5 views
Query mongodb using Predicate and sub-document $type
What I am looking for is how do you translate a query using java spring mongodb based on type of the sub-document into a Predicate.
A normal query would look something like:
Query query = new ...
-1
votes
0answers
9 views
How can I do a has many relationship in Mongoose?
ITEMS
_id
price
name
shop_id
SHOPS
_id
name
I'm building a geolocation app and I need to get stores and the items they have in them. I used NodeJS + Mongoose for quickness and I understand ...
1
vote
1answer
8 views
MongoDB Regex with multiple options
How do I search in mongo with regex that has multiple options?
as per mongo documentation I can do,
db.collection.find( { field: { $regex: 'acme.*corp', $options: 'i' } } )
How do I do this with ...
0
votes
0answers
7 views
OSX Terminal - How To Write This Command Correctly To Import CSV Into MongoDb
I'm trying to import a TSV file into Mongodb. However I'm not very good with Terminal, and the following command keeps failing. Any advice?
/mongoimport --db webapp-dev --collection cities --type ...
0
votes
2answers
16 views
PB mongodb, mongoose, node.js
I get this error when I try to insert something in mongodb, can you give me a doc for understand and do what I need please ?
...
0
votes
1answer
11 views
.NET implementation of MongoDB remove command
From the console this is as easy as running the command:
db.<collectionName>.remove();
This does not appear to be implemented as part of the .NET driver functionality. How can I produce ...
0
votes
0answers
22 views
Simple WHERE clause with MongoDB
I just started using MongoDB and I have a simple query that's throwing an exception:
public static List<WorkflowItem> GetBySubId(string subId)
{
var query = Query<WorkflowItem>.EQ(x ...
0
votes
1answer
16 views
How to query a dynamic key - mongodb schema design
I have the following document:
{
_id : 1,
key1 : {
samekeyA : "value1",
samekeyB : "value2"
},
key2 : {
...
0
votes
1answer
23 views
MongoDB query to break ties and remove duplicates
I have documents which have a Version, URL, and DateAdded field (among others but these are the relevant ones).
I'd like to find all documents where the Version is "5.5" and the DateAdded is less ...
0
votes
0answers
12 views
Rails With MongoDB - Error On Bundle Update
I have installed mongodb and rails on a CentOS vps.
rails new myapp --skip-active-record
In my Gemfile I have:
gem 'mongoid', github: 'mongoid/mongoid'
gem 'bson_ext', '~> 1.8.6'
And then I ...
0
votes
2answers
18 views
Mongodb - will $addToSet create the field?
Will an array update using $addToSet create the field if it doesn't exist? In other words, if field2 in the line below does not exist, will it be created by this command:
db.collection.update({id: ...
0
votes
1answer
9 views
WaterlineJS find all not in ($nin)
I'm using the Waterline ORM (MongoDB adapter) with SailsJS and trying to return all documents that don't match the specified query along the lines of this:
User.find({
id: { $nin: [array] ...
1
vote
0answers
16 views
ReferenceError: client is not defined Node.js Mongodb
I am creating a client management system and I am using a RESTful approach to create a dash board or sorts.
But, unfortunate I am getting an error in terminal when trying to start a node server that ...
-1
votes
0answers
15 views
Symfony2 fires an error “class 'stdClass' was not found…”
The exception:
"The class 'stdClass' was not found in the chain configured namespaces
test\UserBundle\Document, test\SignUpBundle\Document"
is thrown from CollectionPersister class:
...