You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to allow the setting of Mongo readPreferences on individual method calls. Currently, we can only override the readPreference on the connection which limits flexibility. The proposal is to allow something like:
It would be useful to allow the setting of Mongo readPreferences on individual method calls. Currently, we can only override the readPreference on the connection which limits flexibility. The proposal is to allow something like:
$conditions = ['old' => true];
$readPref = ['secondary', [['dc' => 'north']]];
$oldBooks = Books::all(compact('conditions', 'readPref'));
The ultimate solution will be to allow readPreferences to be set on connection, database, collection and method call.
The text was updated successfully, but these errors were encountered: