// Tested this with ~140k products - compared with pure SQL this is reasonable fast
// In most cases the filter query will be the bottleneck
$i = 0; $model = null; foreach($resultsas$detailId){ // Flush after 20 entities
if(($i++ % 20) === 0){ $entityManager->flush($model); $entityManager->clear();
protectedfunctionsSaveComment($commentData, $blogArticleId) { if(empty($commentData)){ thrownewEnlight_Exception('sSaveComment #00: Could not save comment'); }
/**
* @deprecated in 5.6, will be private in 5.8
*
* Saves a single category. If no category id is passed,
* the save function will create a new category model and persist
* it.
*
* To successful saving a category a parent category id must supplied.
*/
if($field->getOnDelete() === AssociationField::CASCADE){ thrownew \RuntimeException(\sprintf('Cascade delete and referencing core tables are not allowed, field %s', $field->getName())); }