I know that this works as an alternate syntax for declaring an array:
const Schema = new mongoose.Schema({names: { type: Array, cast: String });
but what if I want to make names an Array of ObjectIds and include a Ref?
const NameSchema = new mongoose.Schema({first: String, last: String});
const RootSchema = new mongoose.Schema(names: { type: Array, cast: ObjectId, ref: 'Name' };
let Name = mongoose.model('Name', NameSchema);
let Root = mongoose.model('Root', RootSchema);
My tests to populate such a model return an empty names path.