Open
Description
Hi,
// Stage Schema
const stageSchema = mongoose.Schema(
{
...
federation: federationSchema,
...
// Subdocument Schema
const federationSchema = mongoose.Schema({
nom: {
type: String,
required: true,
trim: true,
},
groupeId: {
type: mongoose.ObjectId,
ref: 'Groupe',
required: false,
},
type: {
type: String,
required: false,
},
});
I want to select all the stages that have a name of federation equal to "toto"
So I tried :
const filter = {}
filter.federation = { stage: 'toto'}
..
await Stage.find(filter).
But 0 stages are returned...
Is my filter correct ?
Metadata
Metadata
Assignees
Labels
No labels