public function updateMany(array $aIds, array $aData = []): bool
    {
        $oDb = Factory::service('Database');
        try {
            $oDb->trans_begin();
            foreach ($aIds as $iId) {
                if (!$this->update($iId, $aData)) {
                    throw new ModelException('Failed to update item with ID ' . $iId);
                }
            }
            $oDb->trans_commit();
            return true;
        } catch (\Exception $e) {
            $oDb->trans_rollback();
            $this->setError($e->getMessage());
            return false;
        }
    }