{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/541","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/541/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/541/events","html_url":"https://github.com/emberjs/ember.js/issues/541","id":3401973,"number":541,"title":"Cannot observe changes to nested properties on array using @each ","user":{"login":"robharper","id":900789,"avatar_url":"https://avatars.githubusercontent.com/u/900789?v=3","gravatar_id":"","url":"https://api.github.com/users/robharper","html_url":"https://github.com/robharper","followers_url":"https://api.github.com/users/robharper/followers","following_url":"https://api.github.com/users/robharper/following{/other_user}","gists_url":"https://api.github.com/users/robharper/gists{/gist_id}","starred_url":"https://api.github.com/users/robharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robharper/subscriptions","organizations_url":"https://api.github.com/users/robharper/orgs","repos_url":"https://api.github.com/users/robharper/repos","events_url":"https://api.github.com/users/robharper/events{/privacy}","received_events_url":"https://api.github.com/users/robharper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/emberjs/ember.js/labels/Bug","name":"Bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":53,"created_at":"2012-02-27T15:14:35Z","updated_at":"2015-05-17T20:43:24Z","closed_at":"2013-11-09T02:50:47Z","body":"Adding an observer on a nested property of objects within a collection does not reliably fire.  I've created a test case that could be added to ```ember-runtime/tests/mixins/array_test.js``` that illustrates this.  Observing a nested property on the EachProxy itself appears to work fine.  However, observing the property using ```@each.nest.isDone``` does not.\r\n\r\nIn the following test, ```count1``` is incremented to 1, ```count2``` is not:\r\n\r\n```javascript\r\ntest('modifying nested contents of an object in an array should call @each observers', function() {\r\n  var ary = new TestArray([\r\n      Em.Object.create({ nest: Em.Object.create({ isDone: false}) }),\r\n      Em.Object.create({ nest: Em.Object.create({ isDone: false}) }),\r\n      Em.Object.create({ nest: Em.Object.create({ isDone: false}) }),\r\n      Em.Object.create({ nest: Em.Object.create({ isDone: false}) })\r\n    ]);\r\n\r\n  var get = Ember.get, set = Ember.set;\r\n  var count1 = 0, count2 = 0;\r\n\r\n  // Works\r\n  var each = get(ary, '@each');\r\n  Ember.addObserver(each, 'nest.isDone', function() { count1++; });\r\n\r\n  // Doesn't work\r\n  Ember.addObserver(ary, '@each.nest.isDone', function() { count2++; });\r\n\r\n  count1 = count2 = 0;\r\n  var item = ary.objectAt(2);\r\n  get(item, 'nest').set('isDone', true);\r\n\r\n  equal(count1, 1, '@each.nest.isDone should have notified - observing @each array');\r\n  equal(count2, 1, '@each.nest.isDone should have notified - observing chain containing @each');\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/102855037","html_url":"https://github.com/emberjs/ember.js/issues/541#issuecomment-102855037","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/541","id":102855037,"user":{"login":"alexspeller","id":1217,"avatar_url":"https://avatars.githubusercontent.com/u/1217?v=3","gravatar_id":"","url":"https://api.github.com/users/alexspeller","html_url":"https://github.com/alexspeller","followers_url":"https://api.github.com/users/alexspeller/followers","following_url":"https://api.github.com/users/alexspeller/following{/other_user}","gists_url":"https://api.github.com/users/alexspeller/gists{/gist_id}","starred_url":"https://api.github.com/users/alexspeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexspeller/subscriptions","organizations_url":"https://api.github.com/users/alexspeller/orgs","repos_url":"https://api.github.com/users/alexspeller/repos","events_url":"https://api.github.com/users/alexspeller/events{/privacy}","received_events_url":"https://api.github.com/users/alexspeller/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T20:43:24Z","updated_at":"2015-05-17T20:43:24Z","body":"@rwwagner90 having one property that changes when another changes is a core feature of computed properties, so I'm not sure what you're describing - if you show the code you're using it's likely that someone can help."}}