When I call the 'unlink' method of an element, it seems to set empty the whole element's relationship attribute when request is made. For example, having the following schemas:
Now, the 'unlink' of a 'factory' in a 'user', it'd look like this:
// Assuming 'factory' as a angular-jsonapi object
// with type: 'factories' and id: '2'
// and 'user' with type: 'users' and id: '1'
user.form.unlink('factory', factory);
When the user.save() is executed, the user's relationship attribute in the request is empty and doesn't remove the relationship:
Am I doing anything wrong or is there a problem in the unlink method?
In the docs it's not clear what 'target' represents on unlink method, I just assumed it was an angular-jsonapi object, but I don't know what it really means.
When I call the 'unlink' method of an element, it seems to set empty the whole element's relationship attribute when request is made. For example, having the following schemas:
Now, the 'unlink' of a 'factory' in a 'user', it'd look like this:
When the user.save() is executed, the user's relationship attribute in the request is empty and doesn't remove the relationship:
Thanks in advance.