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