How to delete data using sets in Magento ORM?
•
Java
Now I'm deleting data
$deleteCCL = Mage::getModel('crossdata/customccitem'); $deleteCCL->load($itemId); $deleteCCL->delete();
Is there a way to delete data using collections:
$rcc = Mage::getModel('crossdata/customccitem')->getCollection()->delete();
?
Thank you.
Balan
Solution
There is no convenient group deletion feature, so either add it to your collection or do it directly
foreach ($rcc as $ccitem) { $ccitem->delete(); }
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码