collection « mongodb « Java Database Q&A

1. Checking for a long value while retriving records from a mongo collection using Mongo Java API

I am trying to retrieve from records from my mongo collection from a Java Program. I need to get the "email" field from my collection which are satisfying a timestamp value ...

2. List of all collections in mongo database in java

how can I get a list of all the collections in the database?

  • database - mongodb;
  • language - java;
  • ide - eclipse;

3. Count of a lazy reference collection without eager loading

I have a Form, Submission, and FileAttachment objects. Submission has file attachments like so: Submission.groovy

Map<String,FileAttachment> attachments
public class FileAttachment {

    ObjectId _id


4. Mongo Java-driver: recreation indexes after collection dropping

I have a necessity to remove all data from mongo collection. Droping of collection works faster than collection.remove(new BasicDBObject()). But it also removes index definitions. Therefore I want to restore index ...

5. Create a collection with users - my javacode ok?

Im using java/mongodb. I would like to create a table (collection) with some users. Well, its working im just not sure about my coding style. Could be this good if i ...