-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested object #47
Comments
This is what I get if I log
So, at line 285 the assignment |
What is |
It is the typeKey |
If you can add a failed test to the bugs section, it would help. |
Here you are: kevinresol@49bd67c |
Where can I find out more about this usage of For example, what is the difference between var ItemSchema = new Schema({
waitingList: {
type: {
current: {
type: [{
date: {type: Date},
user: {type: Number, ref: "User.bug47"},
}]
}
}
}
}) and var ItemSchema = new Schema({
waitingList: {
current: [{
date: {type: Date},
user: {type: Number, ref: "User.bug47"},
}]
}
}) |
I am not sure if there are any extra information out there other than the link I posted and the source code. AFAIK, there should be no different between the two examples, functionally. |
Is this has solution?My code has same problems if key was named "type". |
@Yuliang-Lee your problem is probably unrelated to deep-populate |
@kevinresol I try to modify typeKey but deep-populate occurs error |
I have a schema like this:
So, in essence a sample document looks like this:
In that case I want to deep populate
user
, but if I specify the path as"waitingList.history.user"
. The plugin crashes with errorTypeError: Cannot read property 'paths' of undefined
at this position:mongoose-deep-populate/lib/plugin.js
Line 260 in 0080a09
For some funny reason I am restricted from declaring sub-schema for those embeded documents. It is possible to make it work in such case?
The text was updated successfully, but these errors were encountered: