/**
  * Filter the query by a related \Jalle19\StatusManager\Database\Channel object
  *
  * @param \Jalle19\StatusManager\Database\Channel|ObjectCollection $channel the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildInstanceQuery The current query, for fluid interface
  */
 public function filterByChannel($channel, $comparison = null)
 {
     if ($channel instanceof \Jalle19\StatusManager\Database\Channel) {
         return $this->addUsingAlias(InstanceTableMap::COL_NAME, $channel->getInstanceName(), $comparison);
     } elseif ($channel instanceof ObjectCollection) {
         return $this->useChannelQuery()->filterByPrimaryKeys($channel->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByChannel() only accepts arguments of type \\Jalle19\\StatusManager\\Database\\Channel or Collection');
     }
 }