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
Based on example4, the non-populated ref has type Types.ObjectId | Comment. It is possible to get it to become Comment, by calling populate and that makes sense - at that point we are sure that the object has been populated and contains Comment.
However, up until that point, shouldn't the type be Types.ObjectId? Or at least provide a depopulateTs method that would reduce the type to Types.ObjectId and call depopulate underneath (just like populateTs does).
It might be that I'm doing something wrong, so please if you know of a better way to pass only the ObjectId of a ref after I just loaded up the containing document, let me know :)
The text was updated successfully, but these errors were encountered:
Based on example4, the non-populated ref has type
Types.ObjectId | Comment
. It is possible to get it to become Comment, by calling populate and that makes sense - at that point we are sure that the object has been populated and contains Comment.However, up until that point, shouldn't the type be Types.ObjectId? Or at least provide a depopulateTs method that would reduce the type to Types.ObjectId and call depopulate underneath (just like populateTs does).
It might be that I'm doing something wrong, so please if you know of a better way to pass only the ObjectId of a ref after I just loaded up the containing document, let me know :)
The text was updated successfully, but these errors were encountered: