You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say you have a Teams Model with: name: { type: String, required: true }, playerIds: { type: Array, required: true },
and you use "populate" to prepopulate with the players objects like so const userRolesSchema = { include: { service: 'api/players', nameAs: 'players', parentField: 'playerIds', childField: '_id', asArray: true } }
Is there a way to pass a parameter to the teams api to not prepopulate it sometimes, lets say "/api/teams?players=no"
Thanks
The text was updated successfully, but these errors were encountered:
Lets say you have a Teams Model with:
name: { type: String, required: true }, playerIds: { type: Array, required: true },
and you use "populate" to prepopulate with the players objects like so
const userRolesSchema = { include: { service: 'api/players', nameAs: 'players', parentField: 'playerIds', childField: '_id', asArray: true } }
Is there a way to pass a parameter to the teams api to not prepopulate it sometimes, lets say "/api/teams?players=no"
Thanks
The text was updated successfully, but these errors were encountered: