Skip to content

Injecting an item with relationships a second time breaks relationships #253

Closed
@OverZealous

Description

@OverZealous

If you load an item from the server with partial server-side included information, then load it a second time with additional information, relationships will not be correctly injected and updated on the item.

Example showing issue: http://plnkr.co/edit/YpLgDBxL1ro05MKR3v9h

Notice, when you first load the page, the single injected Parent.children item is picked up. Upon clicking the button, you would expect the list of children to update, but they do not. This is because _injectRelations is not called if the item already exists in the cache.

The issues caused by this extend much further than just the items not being in the cache. The child items are actually no longer DS resources (even if they were previously), and so they are missing all functions and other behavior that would be expected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions