Answer the question
In order to leave comments, you need to log in
Why don't populations work with String instead of ObjectID?
Good evening everyone. why don't populations work with mongoose.Schema.Types.String? is it possible at all? code such
model Tweet.js
hashtags: [{ type: mongoose.Schema.Types.String, ref: 'Hashtag' }]
"Cast to ObjectId failed for value \"one\" at path \"_id\" for model \"Hashtag\""
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question