QueryDSL delete method
querydsl, spring-data, spring-data-mongodb
Solution
What you can probably do is this. With the predicate for "where" condition, query for the objects and then pass that to the delete method
QMyObj obj= new QMyObj("myObj");
Iterable<MyObj> myObjs = myObjRepository.findAll(obj.property.eq("property"));
myObjRepository.delete(myObjs);
Here I am first creating an instance of the Q class and then finding all the objects based on the predicate. Then calling the repository's `void delete(Iterable<? extends T> entities)` method.
May be it is because of this workaround they don't provide it, but that is for the Spring Source guys to confirm
Problem
I'm using spring-data-mongodb 1.2.0 with QueryDSL 2.9.0. Why doesn't the `QueryDslPredicateExecutor` have a `delete(Predicate predicate)` method? Is there a workaround?