-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.4.0-rc3
-
Component/s: Querying
-
Fully Compatible
-
ALL
-
Query 2016-11-21
When performing a legacy find, getMore or killCursors on a view, users get the error message "Namespace <view> is a view, not a collection". For example, in the shell,
> db.getMongo().forceReadMode("legacy"); > db.view.find().toArray(); 2016-11-14T18:52:32.559-0500 E QUERY [main] Error: error: { "$err" : "Namespace test.view is a view, not a collection", "code" : 166 } : _getErrorWithCode@src/mongo/shell/utils.js:25:13 DBQuery.prototype.next@src/mongo/shell/query.js:309:1 DBQuery.prototype.toArray@src/mongo/shell/query.js:338:16 @(shell):1:1
This is rather unhelpful from a user's standpoint. We should consider making this error more user-friendly and explicitly state that legacy find and getMore is not supported on a view.
- is duplicated by
-
SERVER-27034 views_legacy.js should test OP_GET_MORE/OP_KILL_CURSORS against a view
- Closed