You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then since IDENTIFIERS feature flag was turned on, that payload object was mutated to:
{
"data": {
"id": 1,
"type": "person",
"lid": "some uuid or other string from generateIdForRecord",
"attributes: { ... }
}
}
Expected Result: Payload object is unchanged, but record returned by findRecord has an added lid.
Actual Result: Payload object is modified to contain an lid.
Note: Fixing this bug may cause a performance regression. Furthermore, users are unlikely to notice this issue outside of testing with a mock server.
Versions
Run the following command and paste the output below: yarn list ember-source && yarn list ember-cli && yarn list ember-data.
yarn list v1.19.0
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ [email protected]
Done in 1.95s.
yarn list v1.19.0
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ [email protected]
Done in 1.99s.
yarn list v1.19.0
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ [email protected]
Done in 2.88s.
(This bug is likely reproducible in the 3.15 beta)
The text was updated successfully, but these errors were encountered:
overall this has proved to not be an issue; however, it was a limitation that prevented payloads being fully opaque to the store. emberjs/rfcs#854 addresses this and emberjs/rfcs#860 updates request fulfillment. Collectively they ensure we can thread enough context to the cache that this mutation is no longer necessary.
Discovered during writing #6754, see comments in the PR.
Description
If you call
await store.findRecord('person', 1)
and the mock server in your test returns this payload, which is a Plain Old JavaScript Object:then since IDENTIFIERS feature flag was turned on, that payload object was mutated to:
Expected Result: Payload object is unchanged, but record returned by findRecord has an added lid.
Actual Result: Payload object is modified to contain an lid.
Note: Fixing this bug may cause a performance regression. Furthermore, users are unlikely to notice this issue outside of testing with a mock server.
Versions
Run the following command and paste the output below:
yarn list ember-source && yarn list ember-cli && yarn list ember-data
.(This bug is likely reproducible in the 3.15 beta)
The text was updated successfully, but these errors were encountered: