If a function call is done in java like:
collection.update(match, new BasicDBObject("$pull", update));
How can I know the number of documents updated in database after this statement execution?
And my other problem is, that I want to remove an element from an array in a document, if that element exists the collection. How can I do that easily? Should I query to find whether it is present in collection and then delete it or is there any other easier way?