I can’t find the collection name with country field in projection ticket. Only find spring.mongodb.database=mflix in the application.properties file. Which collection should we actually filter the country from?
‘mflix’ is the db.
once u have set the database to mflix.
Try listing the collections using the ‘show’ command if you are using mongo shell
alternatively explore the list of collection using compass.
Once you get to the collections you can explore more using .findOne to get to what you are looking for.
But the question for the ticket asked for getMoviesByCountry(…) to return a list of title. Which Collections in the Database should you look for the country field?
movies collections is where u should look
I looked at the movies collection as this is the one that get referred to in the MovieDAO class. However when checking with Compass, I found that there is no field named countries in the collection. I did this class halfway in the previous one or two iteration which I didn’t complete, so I used the previous uploaded data. Is it possible that they changed the data recently?
I’ll try to download the handout and redo the upload again to find out.
I did another mongorestore command with a new downloaded handout but found no country field in the new data. I can’t think of anything that I’ve been missing. It is puzzling that nobody have any problem on non existence of field.
I found the problem. I connected with compass to database for the M110 course. I am aware that we have only 1 cluster for the free tier. Apparently the database for M110 course was in the cluster that belongs to the class; I’ve forgotten about it already. Anyway solved 1 problem.