I have a document with an array. I want to delete the document if array exists and size is of 0.
I came up with this mongodb query(something similar)
document.remove({ comments: { $exists: true, $size: 0 } })
please help me in converting this mongodb query to spring-data-mongodb or suggest me if there is any better solution for this.