I use the following method to delete a set of objects based on a certain where condition, but in reality the number of removed objects could be lesser than the passed collection. How do I get the actual count of deleted entities
You can build a query based on primary keys DELETE FROM ... WHERE id IN (1, 2, 3)
or something similar and then use executeUpdate()
method which returns the number of affected rows.
?
– Scary Wombat Jul 8 '14 at 7:48