Select of a Map type with select:false
not working as expected
#12603
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
6.6.2
Node.js version
16.16.0
MongoDB server version
5.0.3
Typescript version (if applicable)
No response
Description
After version 6.6.2 the select with a
+
on a field of typeMap
withselect: false
does not seem to work as expected, it just does not return the element, i'm not sure but it may be related with this change:Steps to Reproduce
Expected Behavior
We expect the body to be returned:
But on version >=6.6.2 it just returns the title:
It seems that the issue requires a type
Map
, a select with a+
and mongoose version >= 6.6.2we can get the body by changing:
type: Object
, instead ofMap
+
from the select (but not what we want)The text was updated successfully, but these errors were encountered: