As from Document lead to my desired object?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
Hello, as from Document lead to my desired object?
There is a model Movies
From the database I get Mongocollection Document
MongoCollection mongoCollection = database.getCollection("movies");

and when I iterate through the entire collection I need the document to change it in the Movie, of course the key document to get but what if 1000 keys? what all to write? If method of some kind?
MongoCursor cur = mongoCollection.find().iterator(); while (cur.hasNext()){ System.out.println(cur.next().toString()); }
by | 13 views

1 Answer

0 like 0 dislike
To make a constructor in the Movie, in which to transmit the Document.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
asked May 10, 2019 by Oleg-Ukraine
110,608 questions
257,186 answers
0 comments
35,536 users