/**
  * Filter the query by a related sfGuardUserPermission object
  *
  * @param   sfGuardUserPermission|PropelObjectCollection $sfGuardUserPermission  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   sfGuardPermissionQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterBysfGuardUserPermission($sfGuardUserPermission, $comparison = null)
 {
     if ($sfGuardUserPermission instanceof sfGuardUserPermission) {
         return $this->addUsingAlias(sfGuardPermissionPeer::ID, $sfGuardUserPermission->getPermissionId(), $comparison);
     } elseif ($sfGuardUserPermission instanceof PropelObjectCollection) {
         return $this->usesfGuardUserPermissionQuery()->filterByPrimaryKeys($sfGuardUserPermission->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBysfGuardUserPermission() only accepts arguments of type sfGuardUserPermission or PropelCollection');
     }
 }