/**
  * Filter the query by a related \Batch object
  *
  * @param \Batch|ObjectCollection $batch The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildRBatchForbookQuery The current query, for fluid interface
  */
 public function filterByBatch($batch, $comparison = null)
 {
     if ($batch instanceof \Batch) {
         return $this->addUsingAlias(RBatchForbookTableMap::COL__BATCHID, $batch->getId(), $comparison);
     } elseif ($batch instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(RBatchForbookTableMap::COL__BATCHID, $batch->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByBatch() only accepts arguments of type \\Batch or Collection');
     }
 }