"object" as a type does not work in the allowedCountries array. It gives the following error;
TypeError: Invalid schema configuration: `object` is not a valid type within the array `allowedCountries`.See http://bit.ly/mongoose-schematypes for a list of valid schema types.
I am able to save a festival with an array of UUIDs, but when fetching i can not seem to be able to populate because it always returns an empty array.
Here is the command;
Hello.
So there are not examples of how I can populate an array field from a different schema. For example;
Country Model;
Festival Model;
"object" as a type does not work in the
allowedCountries
array. It gives the following error;I am able to save a festival with an array of UUIDs, but when fetching i can not seem to be able to populate because it always returns an empty array. Here is the command;
I believe I'm getting something wrong in my approach. Please help.