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