0

I am new to Jackson DB. Now I know that to get the entire document list of a collection using Jackson we need to do :

COllectionClass.coll.find().toArray();

which is Jackson DB equivalent to the mongodb command :

db.collection.find()

So What is the Jackson DB equivalent of say :

db.collection.find({},{"fieldName":1, "_id":0}) 
Rohit Rane
  • 2,790
  • 6
  • 25
  • 41

1 Answers1

1

As given here, This might be helpful to you. (not tested)

coll.find(DBQuery.is(),//add your criteria for search here
    DBProjection.include("fieldName")).toArray();
Vishwas
  • 6,967
  • 5
  • 42
  • 69