I need to remove all the data from certain collection.
anybody knows how to perform this line using mongoTemplate:
i know there's a remove method but it needs a query, and i dont know how to create an empty query that selects all the documents in the collection.Code:>db.myCollection.remove({});
is it ok to call:
Code:mongoTemplate.dropCollection("myCollection");


Reply With Quote
