Top "Mongodb-java" questions

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

PersistenceConstructor argument variable name doesn't match instance variable name

I'm trying to persist the following object with spring-data-mongodb version 1.1.1.RELEASE: @Document public static class TestObject { private final int m_…

java naming-conventions spring-data mongodb-java spring-data-mongodb
How to create a compound index in MongoDB through Java driver?

I want to create compound index on Age and Name in MongoDB through Java driver and here is my syntax: …

java mongodb indexing mongodb-java
How to read date (Timestamp) from MongoDB using Java

Am trying to read date field from MongoDB in below format Formate: YYYY-MM-dd HH:mm:ss.SSSSSS 2017-01-23-10.46.07.812000 …

java mongodb mongodb-java mongodb-java-3.3.0
Setup custom converters in Spring Data Mongo

We are trying to setup our own Converters for Spring Data Mongo and having problems with it. Seems like Spring …

java spring mongodb spring-data-mongodb mongodb-java
How to write multiple group by id fields in Mongodb java driver

In the below query { $group : { _id : { success:'$success', responseCode:'$responseCode', label:'$label'}, max_timeStamp : { $timeStamp : 1 }, count_responseCode : { $…

mongodb aggregation-framework mongodb-java
MongoDB java-driver insert date

I'm using MongoDB 2.2 with java-driver 2.10.1 I'm inserting a date field into a document from a java.util.Date instance. My …

mongodb date mongodb-java
Pass DBRef in mongo query while fetching a document using java

db.collectionB.findOne() { "_id" : NumberLong(24), "class" : "Top", "type" : DBRef("collectionA", NumberLong(47)) } db.collectionA.findOne() { "_id" : NumberLong(47), "name" : "John", "position" : 2 } QUERY …

java mongodb mongodb-java mongo-java dbref
retrieving data with mongodb java driver 3.4 using find()-method with projection

I am using mongodb java driver 3.4. In the mongodb database documents are saved according to the following structure: { "_id" : ObjectId("595…

java mongodb projection mongodb-java data-retrieval
Bulk insert performance in MongoDB for large collections

I'm using the BulkWriteOperation (java driver) to store data in large chunks. At first it seems to be working fine, …

performance mongodb insert mongodb-java
MongoDB Java driver: autoConnectRetry

Our current connection configuration looks like this: MongoClientOptions.builder() .autoConnectRetry(true).maxAutoConnectRetryTime(1200000) .socketTimeout(30000).connectTimeout(15000).build(); // SocketTimeout: 30s, ConnectionTimeout 15s, ReconnectRetry: 20…

java mongodb mongodb-java