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

Denormalizing nested fields trigger unwanted updates when other part of the nested field is modified #22

Open
vparpoil opened this issue Mar 9, 2020 · 0 comments · May be fixed by #23

Comments

@vparpoil
Copy link

vparpoil commented Mar 9, 2020

If one collection is referencing nested fields as such :

Task.cache({
    type: 'one',
    collection: Meteor.users,
    fields: ['profile.firstName', 'profile.lastName'],
    referenceField: 'userId',
    cacheField: 'userCache'
})

Then an update of the profile will trigger unwanted cascading updates that could result in poor application performance depending on collection sizes :

Meteor.users.update({_id: "some id"}, { '$set': { 'profile.connexionDate': new Date() } })

I will try to work on a PR to fix this. Any hints on a proper way to treat this issue will be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant