OH MY @@@ GAWD.
My collection on mongodb was named countryCode
~ capital 'C'.
And Mongoose couldn't see until I renamed it countrycode
.
Mongoose debug turned on also didn't report anythiing.
Terrible design that enforces such case sensitivity ACROSS systems.
Also, this little flaw of design is NOT compliant with mongodb.
After changing the 'C' to 'c' I have to change my query in mongodb to db.getCollection('countrycodes').find({})
. In mongoDB case has to match.
Mongoose throws that rule out and enforces everything be lower case.
Kind of like how MS Entity Frameworks enforces that draconian rule of entities have to be in plural naming conventions.
That's all so ... IMO Mongoose lends to good reason to use MS SQL Server. Tell them I said so.