i have a question. I'm trying to delete array of objects and thinking that the approach i'm trying to implement could be optimized more.
Does this function sends only one query to database to delete all of the objects ?
public function removeData(array $files)
{
foreach ($files as $file) {
$this->entityManager->remove($file);
}
$this->entityManager->flush();
return true;
}
Maybe i should use bulk deletion ?
I need some opinions.
Thanks.