Before an object can be removed, it is checked if it is linked with another object. In general this behaviour is ok. A problem occurs if you have two objects which are linked bidirectional.
Some thing like this
In this case you have to manually remove the links with the xeditor and then you can remove the objects.
I would like to have a CLI command to remove all links of an object:
clear links of object my_sample_00000002
and have a Java API to remove a single object link of another object: