What you can do is. With a predicate for the where clause, query for the objects, and then pass this to the delete method
QMyObj obj= new QMyObj("myObj"); Iterable<MyObj> myObjs = myObjRepository.findAll(obj.property.eq("property")); myObjRepository.delete(myObjs);
Here, I first instantiate the Q class, and then find all the objects based on the predicate. Then the void delete(Iterable<? extends T> entities) repository method void delete(Iterable<? extends T> entities) called.
Perhaps this is because of this workaround that they do not provide, but for Spring, the original guys confirm
Dhanush gopinath
source share