Mongoose.populate() returns empty array instead of data Mongoose.populate() returns empty array instead of data mongoose mongoose

Mongoose.populate() returns empty array instead of data


I realized that somehow I have same ID for StoryPart and Story instances. That's why it returns nothing.

EDIT:

I have resolved the problem by ensuring and correcting IDs of story and storypart. I do not delete the question since there might be people facing the same problem, so just check your ObjectIDs if they refer to correct instances.