jeanfredrik / meteor-denormalize

Provides simple methods for common denormalization tasks
13 stars 5 forks source link

Fix support for nested fields #15

Open Herteby opened 7 years ago

Herteby commented 7 years ago

Hi there! Still active? :slightly_smiling_face:

If you tried using nested fields with cacheDoc (like this: ['profile.first_name','profile.last_name']), Mongo would give an error, because $set ended up looking like this:

$set:{
  _user:{
    'profile.first_name':'Simon',
    'profile.last_name':'Herteby'
  }
}

I've fixed it in this pull request: https://github.com/jeanfredrik/meteor-denormalize/pull/14