public function delete($sOXID = null)
    {
        if (!$sOXID) {
            $sOXID = $this->getId();
        }

        if (!$this->canDeleteAttribute($sOXID)) {
            return false;
        }

        // remove attributes from articles also
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sOxidQuoted = $oDb->quote($sOXID);
        $sDelete = "delete from oxobject2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

        // #657 ADDITIONAL removes attribute connection to category
        $sDelete = "delete from oxcategory2attribute where oxattrid = " . $sOxidQuoted;
        $oDb->execute($sDelete);

        return parent::delete($sOXID);
    }