-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findAll Resolving before it is done Updating #3483
Comments
Try passing |
Thanks @jmurphyau, but that didn't work for me. Also, I'd rather not do a reload. I have some volatile bits of information, but I'm also loading up lists of items that don't change very often, so I would like to reduce the network chattiness. |
It seems it doesn't work for me either, I am loading the foo collection by running |
I also experienced this issue with Ember Data @jmurphyau - What's the logic/reason that makes this the solution (or at least workaround). |
FYI, the adapter I am using is Emberfire's FirebaseAdapter. |
I'm also experiencing this when doing (from a route): this.get('store').findAll('model').then(function(collection) {collection.toArray()}); Anything that calls However, if you check it "later" using something like Update: using |
I am closing this issue since the documentation should have improved now that #4338 has been merged. Please feel free to reopen if you think this is still not documented sufficiently. Thanks! |
I'm using ember-data 1.13.4 with the JSONAPISerializer/Adapter. I'm trying
this.get('store').findAll('foo').sortBy('bar')
, but it's returning an empty array. The findAll is resolving before the array is populated and the sortBy is creating a new array from the incomplete record array.Upon inspection of
this.get('store').findAll('foo').then(function(arrayProxy) {})
, thearrayProxy
is markedisUpdating === true
. If I wait for it to be done updating, I can then apply my sort, but the original sortBy should work.Edit:
In my adapter, I have
shouldReloadAll
return false, but this still happens when returning true and when callingfindAll('foo', { reload: true })
.Additionally, I also want to have
shouldBackgroundReloadAll
return false, but when false, the initial network request is never made. If I change the logic to the following:The network request is made the first time, but subsequent times do not clear the
isUpdating
flag. Instead of checking forisUpdating
false, I have to check that the length is greater than 0. When set to true, the network request is made every time.The text was updated successfully, but these errors were encountered: