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