/**
  * Filter the query by a related SubscriberGroup object
  *
  * @param   SubscriberGroup|PropelObjectCollection $subscriberGroup The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 NewsletterMailingQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterBySubscriberGroup($subscriberGroup, $comparison = null)
 {
     if ($subscriberGroup instanceof SubscriberGroup) {
         return $this->addUsingAlias(NewsletterMailingPeer::SUBSCRIBER_GROUP_ID, $subscriberGroup->getId(), $comparison);
     } elseif ($subscriberGroup instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(NewsletterMailingPeer::SUBSCRIBER_GROUP_ID, $subscriberGroup->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySubscriberGroup() only accepts arguments of type SubscriberGroup or PropelCollection');
     }
 }