SERVER-138625ClosedDuplicate

isSimpleIdQuery ignores extra fields

If you have a query of the form '\{_id: {a: 0, $eq: 2}}', isSimpleIdQuery in query_utils.cpp will return true and it will get sent to the express executor path where  getQueryFilterMaybeUnwrapEq will unwrap it to '\{_id: 2}' and ignore the 'a: 0' entirely.  It should never get sent to the express path in the first place because isSimpleIdQuery should return false when there are multiple fields in the object.

Affected Versions
Versions known to exhibit this issue
8.3.09.0.0
Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.