I have a mongoose find() query where I'd like to then use .populate to fill in some of the cross references. I'm running this against the secondary node of a mongo replica set. I can run the query just fine against the primary, and I can run "normal" find and aggregate queries (without population) against the secondary using the documented read preferences.
I get stuck when adding the .populate() line. I get the following error:
{ [MongoError: not master and slaveOk=false] name: 'MongoError' }
The appropriate schemas are defined, etc. and the query, with the .populate line, runs fine against the primary. Just not against the secondary (though again, the same query without populate() line runs correctly against the secondary). Any ideas? Thanks!