Where is actors collection?

On Chapter1 Using POJO - Part 1

I can not find actors collection after imported data into mflix DB. so I always get error when ran the unit tests. Anyone know how to import actors collection?

Hello,

You had me for a second. There is no actors collection. Check the code in UsingPojoLesson.java file. You have to create the collection:

/*
 * To get a reference to the connection objects used here, check out
 * @see AbstractLesson
 */

MongoCollection<Document> actors = testDb.getCollection("actors");

/*
 * Now we can create two document objects and fill in each field
 * value.
 */

Best regards,
Catalin

1 Like