/**
  * Removes all relations for a bean. This method breaks every connection between
  * a certain bean $bean and every other bean of type $type. Warning: this method
  * is really fast because it uses a direct SQL query however it does not inform the
  * models about this. If you want to notify FUSE models about deletion use a foreach-loop
  * with unassociate() instead. (that might be slower though)
  *
  * @param RedBean_OODBBean $bean reference bean
  * @param string           $type type of beans that need to be unassociated
  *
  * @return void
  */
 public function clearRelations(RedBean_OODBBean $bean, $type)
 {
     $this->oodb->store($bean);
     try {
         $this->writer->deleteRelations($bean->getMeta('type'), $type, $bean->id);
     } catch (RedBean_Exception_SQL $exception) {
         $this->handleException($exception);
     }
 }