Skip to content

Fix isUpdating for DS.AdapterPopulatedRecordArray#update() - #4316

Merged
bmac merged 2 commits into
warp-drive-data:masterfrom
pangratz:fix-adapter-populated-record-array-update
Apr 9, 2016
Merged

Fix isUpdating for DS.AdapterPopulatedRecordArray#update()#4316
bmac merged 2 commits into
warp-drive-data:masterfrom
pangratz:fix-adapter-populated-record-array-update

Conversation

@pangratz

@pangratz pangratz commented Apr 9, 2016

Copy link
Copy Markdown
Contributor

The isUpdating flag is not set to true when the update() method on
a DS.AdapterPopulatedRecordArray is invoked. As with the flag on
DS.RecordArray, this should be true until the update is finished and
the array contains the most reset result for the query, fetched from the
adapter.


The [FEATURE] commit DRY's up some code in the DS.AdapterPopulatedRecordArray and by this makes it easier to cherry-pick this bugfix into beta (where this feature is not yet available).

});

test("a query can be updated via `update()`", function(assert) {
let done = assert.async();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this done needed? I thought the run loop would remove the need for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right 👍 Removed the done and the amount of expected assertions, since this is handled by the run-loop...

@bmac

bmac commented Apr 9, 2016

Copy link
Copy Markdown
Contributor

Overall looks good.

The `isUpdating` flag is not set to `true` when the `update()` method on
a `DS.AdapterPopulatedRecordArray` is invoked. As with the flag on
`DS.RecordArray`, this should be `true` until the update is finished and
the array contains the most reset result for the query, fetched from the
adapter.
@bmac
bmac merged commit c628d74 into warp-drive-data:master Apr 9, 2016
@pangratz
pangratz deleted the fix-adapter-populated-record-array-update branch April 10, 2016 08:00
bmac pushed a commit that referenced this pull request May 17, 2016
A regression for the `isUpdating` flag on the RecordArray returned for
`store.peekAll` has been introduced in #4316: the flag isn't set to true
anymore when records are reloaded or a background reloaded.

(cherry picked from commit 50b4c27)
bmac pushed a commit that referenced this pull request May 17, 2016
A regression for the `isUpdating` flag on the RecordArray returned for
`store.peekAll` has been introduced in #4316: the flag isn't set to true
anymore when records are reloaded or a background reloaded.

(cherry picked from commit 50b4c27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants