Deletes the specified entities from the database. DELETE statements are called on the rows in the
corresponding tables. The entity instances themselves are not invalidated, but it doesn't even make sense to
continue using the instance without a row with which it is paired.
This method does attempt to group the DELETE statements on a per-type basis. Thus, if you pass 5 instances of
EntityA
and two instances of EntityB
, the following SQL prepared statements will be
invoked:
DELETE FROM entityA WHERE id IN (?,?,?,?,?);
DELETE FROM entityB WHERE id IN (?,?);
Thus, this method scales very well for large numbers of entities grouped into types. However, the execution
time increases linearly for each entity of unique type.