Skip to content

Add/remove relations via proxy content

Choose a tag to compare

@pixelhandler pixelhandler released this 26 Jan 08:47
· 88 commits to master since this release

Enhances behavior of adding and removing relationships to a resource.

On a Resource object, with related (computed properties) proxy objects, the addRelationship and removeRelationship methods utilize the related service's cache data to add (assign) or remove the related resource via the content of the related proxy object. Resource objects that have isNew set to true will use proxy objects as well, (no related promise proxy, only a proxy). Creating a resource with relations requires the relationships object to include a links object with a related property that is the URL for the relationship data.