These are chat archives for Automattic/mongoose
varinstead? I'm sure that's not the issue but good to know that :)
consteverywhere you can. Fall back to
letonly when you need to re-assign that variable.
potential noobie question, and it might be bad design.
Lets say I have a scheme (let's say party) that has a property called "events" which is an array of ObjectId's of an Event model.
Let's say that by using discrimination I have multiple "kinds" of models.
Ok, so when I want to populate the events of any instances of our "party scheme", I get as result only some form of population that is shared in the "parent" class of the Event model. And not specific properties that any derived (by discrimination) are stored in the DB.
I have a Scheme A, which has an array containing ObjectIDs of Model B, but they can refer to "subclasses" (by discrimination) of B; B1, B2,… and population of A-instances only populates B properties.
Can someone point me in the right direction?