emberjs / data

A lightweight reactive data library for web applications. Designed over composable primitives.

Home Page:https://api.emberjs.com/ember-data/release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chained computed properties not updating on a record addition

jrburke opened this issue · comments

Reproduction/Description

I created an ember project with one test file in it that contains the entire code and test. Run ember test to see the failure:

https://github.com/jrburke/ember-data-chained-computed

The specific test file:
https://github.com/jrburke/ember-data-chained-computed/blob/master/tests/unit/nested-computed-test.js

From the README:

The computed dependency chain:

In Ember and Ember Data 3.5.0, an update to add a new groupMember to the Group does not result in Message.people updating. In 2.18.2 the update did occur, the test passes.

Not sure if this is specifically an ember data issue or a computed/observer issue, but since all the objects involved are Model objects, starting with ember-data.

Versions

ember-data-chained-computed@0.0.0 /Users/jr/git/temp/ember-data-chained-computed
└── ember-source@3.5.1 

ember-data-chained-computed@0.0.0 /Users/jr/git/temp/ember-data-chained-computed
└── ember-cli@3.5.0 

ember-data-chained-computed@0.0.0 /Users/jr/git/temp/ember-data-chained-computed
└── ember-data@3.5.0 

@jrburke is this still an issue for you? I suspect the trouble here was related to various other array-observer issues we had to fix in 3.1->3.5. I'm going to close this because in the octane world doing this with cached and/or getters should "just work" but feel free to reopen if it does not.