/**
  * Filter the query by a related afWidgetSelector object
  *
  * @param     afWidgetSelector $afWidgetSelector  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    afWidgetCategoryQuery The current query, for fluid interface
  */
 public function filterByafWidgetSelector($afWidgetSelector, $comparison = null)
 {
     if ($afWidgetSelector instanceof afWidgetSelector) {
         return $this->addUsingAlias(afWidgetCategoryPeer::ID, $afWidgetSelector->getCategoryId(), $comparison);
     } elseif ($afWidgetSelector instanceof PropelCollection) {
         return $this->useafWidgetSelectorQuery()->filterByPrimaryKeys($afWidgetSelector->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByafWidgetSelector() only accepts arguments of type afWidgetSelector or PropelCollection');
     }
 }