Skip to content
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

Dynamic ref path does not work inside Map #11068

Closed
ManimuthurajT opened this issue Dec 10, 2021 · 1 comment
Closed

Dynamic ref path does not work inside Map #11068

ManimuthurajT opened this issue Dec 10, 2021 · 1 comment
Labels
confirmed-bug We've confirmed this is a bug in Mongoose and will fix it.

Comments

@ManimuthurajT
Copy link

I have schema type as Map in my mongoose model.
How to use refPath in Map? using "values.$*.refp" doesn't work.
This is my model:

const listFieldValuesSchemaDef = {
    ...
    value: {
        type: Schema.Types.Mixed,
    },
    valueObject: {
        type: Schema.Types.ObjectId,
        refPath: "values.$*.refp",
    },
    refp: {
        type: Schema.Types.String,
    },
};

const listRowSchemaDef = {
    ...
    values: { type: Schema.Types.Map, of: listFieldValuesSchema },
};
@vkarpov15 vkarpov15 added this to the 6.1.4 milestone Dec 12, 2021
@IslandRhythms IslandRhythms added the help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary label Dec 14, 2021
@vkarpov15
Copy link
Collaborator

This was fixed with #9359

@vkarpov15 vkarpov15 removed this from the 6.1.4 milestone Dec 23, 2021
@vkarpov15 vkarpov15 added confirmed-bug We've confirmed this is a bug in Mongoose and will fix it. and removed help This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary labels Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug We've confirmed this is a bug in Mongoose and will fix it.
Projects
None yet
Development

No branches or pull requests

3 participants