Hi,
I am not sure whether this is an intended behaviour or not but I think the way getCollection() on MongoDatabase works is a bit strange.
The method's signature is the following:
func getCollection(name collectionName: String) -> MongoCollection?
Therefore, I expect to get a valid collection when collectionName corresponds to an existing collection in my database and nil when collectionName does not exist.
Instead of this, I indeed get the correct collection when collectionName is valid but when it's not I'm getting new empty collection that apparently does not even belong to my database.
Am I missing something from the doc or is there really a problem here?
Thank you in advance 😄