Top "Mongodb-java" questions

MongoDB is a scalable, high-performance, open source, document-oriented database.

How do I partially update an object in MongoDB so the new object will overlay / merge with the existing one

Given this document saved in MongoDB { _id : ..., some_key: { param1 : "val1", param2 : "val2", param3 : "val3" } } An object with new information …

mongodb mongodb-java
How to insert multiple documents at once in MongoDB through Java

I am using MongoDB in my application and was needed to insert multiple documents inside a MongoDB collection . The version …

java mongodb bulkinsert mongodb-java
Mockito.any() for <T>

I want to mock a method with signature as: public <T> T documentToPojo(Document mongoDoc, Class<T&…

java unit-testing mockito mongodb-java springmockito
How to query documents using "_id" field in Java mongodb driver?

I am trying to find documents in MongoDB by searching on "_id" key. My document looks like this- { "_id" : ObjectId("4…

java mongodb mongodb-java
MongoDb connection refused

This is my first attempt to consume MongoDB. I've got Mongo running: ps -ef | grep [m]ongo mongodb 11023 1 0 Jun24 ? 00:00:03 /usr/…

mongodb mongodb-java
MongoSocketReadException: Prematurely reached end of stream (after a period of inactivity)

I get this error on a find call (default Java Driver) after a period of inactivity. I tried to add …

java mongodb mongodb-java compose
How to add an array to a MongoDB document using Java?

I want to create the following document schema in mongoDB using the java driver { "_id": { "$oid": "513e9820c5d0d8…

mongodb mongodb-java
Call stored function in mongodb

I'm getting some difficulties to call a stored function within mongdb. I'm a little bit newbie with mongo. [EDIT] : my …

mongodb mongodb-java
How to get mongo command results in to a flat file

How do I export the results of a MongoDB command to a flat file For example, If I am to …

mongodb mongodb-java mongodb-query
Spring Data MongoDB Date Between

I use spring data mongodb. I want the records between two dates. The following MongoDB Query works: db.posts.find({…

java spring spring-data mongodb-java