{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/falcor/issues/576","labels_url":"https://api.github.com/repos/Netflix/falcor/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/falcor/issues/576/comments","events_url":"https://api.github.com/repos/Netflix/falcor/issues/576/events","html_url":"https://github.com/Netflix/falcor/issues/576","id":111512268,"number":576,"title":"Issue with set and multi-value paths in falcor router","user":{"login":"nholland94","id":5352803,"avatar_url":"https://avatars.githubusercontent.com/u/5352803?v=3","gravatar_id":"","url":"https://api.github.com/users/nholland94","html_url":"https://github.com/nholland94","followers_url":"https://api.github.com/users/nholland94/followers","following_url":"https://api.github.com/users/nholland94/following{/other_user}","gists_url":"https://api.github.com/users/nholland94/gists{/gist_id}","starred_url":"https://api.github.com/users/nholland94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nholland94/subscriptions","organizations_url":"https://api.github.com/users/nholland94/orgs","repos_url":"https://api.github.com/users/nholland94/repos","events_url":"https://api.github.com/users/nholland94/events{/privacy}","received_events_url":"https://api.github.com/users/nholland94/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-14T23:03:39Z","updated_at":"2015-10-14T23:12:44Z","closed_at":null,"body":"Hello. I am experiencing an issue where I try to set the values of multiple paths at once from a Falcor Model, but my route handler only receives a single field with a value (which is always the first alphabetically sorted field).\r\n\r\nThis is what my Model set call looks like (I have tried it with pathValues as well). In this example, site does not have any fields that are invalid paths.\r\n\r\n      return AtreyuModel.set({\r\n        json: {\r\n          peak: {\r\n            site: site\r\n          }\r\n        }\r\n      }).then(function(data) {\r\n        return data.json.peak.site;\r\n      });\r\n\r\nAnd here is the handler for that path.\r\n\r\n    var tableFields = [ 'name', 'address', 'optional_address', 'city', 'subregion',  'zip_code' ];\r\n\r\n    ....\r\n\r\n    {\r\n      route: 'peak.site[' + PathUtils.formatFields(tableFields) + ']',\r\n\r\n      get: function(pathSet) {\r\n        var fields = pathSet[2];\r\n\r\n        return this.services.peak.site.get().then(function(site) {\r\n          return fields.map(function(field) {\r\n            return {\r\n              path: ['peak', 'site', field],\r\n              value: site[field]\r\n            };\r\n          });\r\n        });\r\n      },\r\n\r\n      set: function(jsonGraphArg) {\r\n        console.log(JSON.stringify(arguments));\r\n\r\n        return this.services.peak.site.update(jsonGraphArg.peak.site).then(function(site) {\r\n          return tableFields.map(function(field) {\r\n            return {\r\n              path: ['peak', 'site', field],\r\n              value: site[field]\r\n            };\r\n          });\r\n        });\r\n      }\r\n    },\r\n\r\nThe first console.log statement in the set handler prints out the following: `{\"0\":{\"peak\":{\"site\":{\"address\":\"qwer\"}}}}`.\r\n\r\nI don't know if this is a bug or just something I'm doing wrong somewhere. I put some debug statements into the falcor router code in my node_modules directory and found out that the root cause is the match function returning a single match with the correct virtual path, but a requested path of ['peak', 'site', 'address']."},"comment":{"url":"https://api.github.com/repos/Netflix/falcor/issues/comments/148229637","html_url":"https://github.com/Netflix/falcor/issues/576#issuecomment-148229637","issue_url":"https://api.github.com/repos/Netflix/falcor/issues/576","id":148229637,"user":{"login":"trxcllnt","id":178183,"avatar_url":"https://avatars.githubusercontent.com/u/178183?v=3","gravatar_id":"","url":"https://api.github.com/users/trxcllnt","html_url":"https://github.com/trxcllnt","followers_url":"https://api.github.com/users/trxcllnt/followers","following_url":"https://api.github.com/users/trxcllnt/following{/other_user}","gists_url":"https://api.github.com/users/trxcllnt/gists{/gist_id}","starred_url":"https://api.github.com/users/trxcllnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trxcllnt/subscriptions","organizations_url":"https://api.github.com/users/trxcllnt/orgs","repos_url":"https://api.github.com/users/trxcllnt/repos","events_url":"https://api.github.com/users/trxcllnt/events{/privacy}","received_events_url":"https://api.github.com/users/trxcllnt/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T23:12:44Z","updated_at":"2015-10-14T23:12:44Z","body":"@nholland94 in your initial `AtreyuModel.set` call, what's the structure of your `site` Object?"}}