I have a relationship from a model called a thisDriveclass Drivesin a column with a name lastDrivethat is also Drive. Sometimes I need to delete this relationship, so nothing is connected (undefined). How to remove a relationship from one drive without deleting.

this is what i tried.
var thisDrive = app.drivesCollection.model[0];
var relation = thisDrive.attributes.lastDrive.relation('lastDrive');
relation.remove('lastDrive');
at this point, I would expect it to thisDrive.attributes.lastDrivebe empty, but that is not ...
If I run thisDrive.attributes.lastDrive.remove(), I will delete the Drivelink this link refers to ... which is bad.
any idea how to achieve this?
Thank.
source
share