{"action":"created","issue":{"url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/53","repository_url":"https://api.github.com/repos/rmmmp/emberfire-utils","labels_url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/53/comments","events_url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/53/events","html_url":"https://github.com/rmmmp/emberfire-utils/issues/53","id":250685443,"number":53,"title":"Loading more data with query isn't working","user":{"login":"BobrImperator","id":15948633,"avatar_url":"https://avatars2.githubusercontent.com/u/15948633?v=4","gravatar_id":"","url":"https://api.github.com/users/BobrImperator","html_url":"https://github.com/BobrImperator","followers_url":"https://api.github.com/users/BobrImperator/followers","following_url":"https://api.github.com/users/BobrImperator/following{/other_user}","gists_url":"https://api.github.com/users/BobrImperator/gists{/gist_id}","starred_url":"https://api.github.com/users/BobrImperator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BobrImperator/subscriptions","organizations_url":"https://api.github.com/users/BobrImperator/orgs","repos_url":"https://api.github.com/users/BobrImperator/repos","events_url":"https://api.github.com/users/BobrImperator/events{/privacy}","received_events_url":"https://api.github.com/users/BobrImperator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-16T16:25:26Z","updated_at":"2017-08-17T01:15:39Z","closed_at":null,"body":"Ember-data ^2.14\r\nEmber  ^2.14\r\nAnd\r\nEmber 2.13.4\r\nEmber-data 2.13\r\n\r\nI've tried adding infinite scroll for my webpage with few different methods using emberfire/emberfire-utils\r\nand none of them seems to work. Closest would be:\r\n`  model() {\r\n  this.get('store').query('image', {\r\n  limitToFirst: 10\r\n}).then((images) => {\r\n  images.get('firebase').next(10);\r\n});\r\n` but I get an error \r\n\r\n> TypeError: Cannot read property 'next' of undefined\r\n\r\nSo I tried to figure out what's inside firebase service and it seemed like it needs cacheId, so I added one\r\n\r\n`  model() {\r\n  this.get('store').query('image', {\r\n  cacheId: 'hello',\r\n  limitToFirst: 10\r\n}).then((images) => {\r\n  images.get('firebase').next(10);\r\n});`\r\n\r\nWith that I receive no more errors, but no data either, well it doesn't appear on screen when calling it in .hbs with {{model.name}} but ember inspector says that there are few models loaded.\r\nSo then I've tried to do it like this - with utility service\r\n\r\n`return firebaseUtil.query('image', {\r\n  cacheId: 'cache_id',\r\n  limitToFirst: 10,\r\n}).then(() => {\r\n  firebaseUtil.next('cache_id', 10);\r\n});`\r\n\r\n> TypeError: Cannot read property 'ref' of undefined\r\n> DEPRECATION: You're loading the next records to an old query usage. Please use the new query \r\n> usage. \r\n\r\nWith that it's still not working, so I was messing around with firebaseUtil methods, trying to use _newNext instead of next, and _oldQuery, _newQuery stuff. But I can't get it running. I'm not really experienced programmer, so it is quite a problem to solve for me. I hope it's at least me doing something wrong, and someone could explain how it should be done.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/comments/322941860","html_url":"https://github.com/rmmmp/emberfire-utils/issues/53#issuecomment-322941860","issue_url":"https://api.github.com/repos/rmmmp/emberfire-utils/issues/53","id":322941860,"user":{"login":"rmmmp","id":13741847,"avatar_url":"https://avatars0.githubusercontent.com/u/13741847?v=4","gravatar_id":"","url":"https://api.github.com/users/rmmmp","html_url":"https://github.com/rmmmp","followers_url":"https://api.github.com/users/rmmmp/followers","following_url":"https://api.github.com/users/rmmmp/following{/other_user}","gists_url":"https://api.github.com/users/rmmmp/gists{/gist_id}","starred_url":"https://api.github.com/users/rmmmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmmmp/subscriptions","organizations_url":"https://api.github.com/users/rmmmp/orgs","repos_url":"https://api.github.com/users/rmmmp/repos","events_url":"https://api.github.com/users/rmmmp/events{/privacy}","received_events_url":"https://api.github.com/users/rmmmp/received_events","type":"User","site_admin":false},"created_at":"2017-08-17T01:15:39Z","updated_at":"2017-08-17T01:15:39Z","body":"May I see your template? I may further help with the debugging if I see it."}}
{"actor":{"display_login":"rmmmp"}}