Is there a more efficient way of deleting multiple entities by id
$data = $this->request->data ['missing_lexicon_id'];
foreach ( $data as $id ) {
$missingLexicon = $this->MissingLexicons->get ( $id );
$this->MissingLexicons->delete ( $missingLexicon )
}
This should work
$this->MissingLexicons->deleteAll(['MissingLexicons.column IN' => $keys]);
Where $keys is an array with the ids to be deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With