I have the document (shown below) in mongodb database atlas with spring boot application. When I delete the document (seller) which is being referenced by the document shown below, the seller reference field is not deleted as well, thus rendering the seller field to refer to non-existing document.
_id: "Q8rWjRVCx4Avu3lvp0D6OuExac23SD"
editable: true
totalAmount: 0
amountPaid: 0
seller: DBRef(employees, BR1pKUGjZU8xdqIlaNvtO9VhqPqmi8, undefined)
_class: com.examle.Transaction
How can the referenced field (seller) be removed from the document by using spring boot operation(s). I have an idea that $unset operator can be used, however, this is a mongodb specific command while I want to carry out this action from my spring boot application. This is different compared to this question which addresses primitive data type, while my question is about references.