Discriminators cause fields in subdocuments to be deselected by default #5775
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Using discriminators on subdocument schema causes fields to be deselected in query.
If I execute the query
I'd expect the result to be
{ :items [{ type: 'type1', active: false, count: 3 }]}
.Instead, it returns
{:items [{ type: 'type1' }]}
.When I don't specify any fields for the query it behaves as expected.
mongoDB version: 3.4.1
node version: 8.5.0
mongoose version: 4.12.5
The text was updated successfully, but these errors were encountered: