{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/3313","labels_url":"https://api.github.com/repos/emberjs/data/issues/3313/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/3313/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/3313/events","html_url":"https://github.com/emberjs/data/issues/3313","id":87512202,"number":3313,"title":"pushing raw JS objects to RecordArray","user":{"login":"gregwallan","id":5788034,"avatar_url":"https://avatars.githubusercontent.com/u/5788034?v=3","gravatar_id":"","url":"https://api.github.com/users/gregwallan","html_url":"https://github.com/gregwallan","followers_url":"https://api.github.com/users/gregwallan/followers","following_url":"https://api.github.com/users/gregwallan/following{/other_user}","gists_url":"https://api.github.com/users/gregwallan/gists{/gist_id}","starred_url":"https://api.github.com/users/gregwallan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregwallan/subscriptions","organizations_url":"https://api.github.com/users/gregwallan/orgs","repos_url":"https://api.github.com/users/gregwallan/repos","events_url":"https://api.github.com/users/gregwallan/events{/privacy}","received_events_url":"https://api.github.com/users/gregwallan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-11T21:51:49Z","updated_at":"2015-06-29T14:31:20Z","closed_at":"2015-06-19T15:33:44Z","body":"19+ no longer supports the pushObject method to add native JS objects to RecordArrays.\r\nSee JS Bin for use case that worked in previous releases. Documentation for MutableArray.pushObject seems to indicate this should be supported.\r\nhttp://emberjs.jsbin.com/gijero/1/edit?html,js,console,output"},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/116705098","html_url":"https://github.com/emberjs/data/issues/3313#issuecomment-116705098","issue_url":"https://api.github.com/repos/emberjs/data/issues/3313","id":116705098,"user":{"login":"chrismllr","id":9942917,"avatar_url":"https://avatars.githubusercontent.com/u/9942917?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismllr","html_url":"https://github.com/chrismllr","followers_url":"https://api.github.com/users/chrismllr/followers","following_url":"https://api.github.com/users/chrismllr/following{/other_user}","gists_url":"https://api.github.com/users/chrismllr/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismllr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismllr/subscriptions","organizations_url":"https://api.github.com/users/chrismllr/orgs","repos_url":"https://api.github.com/users/chrismllr/repos","events_url":"https://api.github.com/users/chrismllr/events{/privacy}","received_events_url":"https://api.github.com/users/chrismllr/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T14:31:20Z","updated_at":"2015-06-29T14:31:20Z","body":"@igorT maybe you can shed some light on this one...\r\n\r\nIn the model hook on page load, I store.find orders and reports for a graph. I then set a long poll to occur every 10 seconds to fetch the orders and reports from the last 10 seconds. I then push them into the arrays of my initial store.find.. Here is my code\r\n\r\n```\r\n  pollReports() {\r\n    const from = moment().subtract(10, 's').toJSON();\r\n    this.controller.setProperties({\r\n      currentPollDateFrom: from,\r\n      currentPollDateTo: moment().toJSON()\r\n    });\r\n\r\n    Ember.RSVP.hash({       \r\n       reports: this.store.query('report', {\r\n        dateFrom: from,\r\n        dateTo: moment().toJSON(),\r\n        range: 'interval',\r\n        search: this.controller.get('search') || '*'\r\n      }),\r\n      orders: this.store.query('order', {\r\n        dateFrom: from,\r\n        dateTo: moment().toJSON(),\r\n        search: this.controller.get('search') || '*'\r\n      })\r\n    })\r\n    .then(resp => {\r\n      const reports = this.get('currentModel.reports');\r\n      const orders = this.get('currentModel.orders');\r\n\r\n      resp.reports.forEach(r => reports.addInternalModel(r));\r\n      resp.orders.forEach(o => orders.addInternalModel(o));\r\n\r\n      this.controller.send('unloadReports');\r\n    })\r\n    .catch(reason => Ember.Logger.error('failed to poll for reports & orders', reason))\r\n    .finally(() => this.set('currentPoll', later(this, this._pollReports, 10000)));\r\n  }\r\n```"}}