Data: BelongsTo not cleared on destroyRecord 3.2.0+

Created on 11 Jul 2018  路  3Comments  路  Source: emberjs/data

https://ember-twiddle.com/8699e6c887c9eb2cb4344fb1d2551dbe?openFiles=routes.application.js%2C

Might be related to #5511

Expected behaviour is that pressing the delete button will remove the post object and clear the belongsTo. This works in 3.1.1
In 3.2.0 the post object remains in the belongsTo in state 'root.deleted.saved' while it is removed from the store (store.peekAll('post').length returns 0, written to console with second button)

I can't get beta to work in ember-twiddle, but copying the twiddle to a local project shows that beta and master both don't work.

Most helpful comment

I have confirmed that this is the same issue as #5511 and #5517 with one slight variation in which the relationship flag state should now be relationshipIsEmpty: true yet it is still false. I will add a test for this case to ensure the flags transition properly in the PR for these issues #5533.

All 3 comments

Release v6.0.0 tests for the ember-pouch adapter fail on this bug. See: https://travis-ci.org/pouchdb-community/ember-pouch/builds/403065559 I hope it can be solved soon.

I have confirmed that this is the same issue as #5511 and #5517 with one slight variation in which the relationship flag state should now be relationshipIsEmpty: true yet it is still false. I will add a test for this case to ensure the flags transition properly in the PR for these issues #5533.

@runspired Thanks for fixing this. All test pass again :pouch: 馃弳馃帀馃帀馃帀馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

concertiv picture concertiv  路  4Comments

HenryVonfire picture HenryVonfire  路  3Comments

ef4 picture ef4  路  4Comments

maschwenk picture maschwenk  路  5Comments

NullVoxPopuli picture NullVoxPopuli  路  5Comments