/** * Filter the query by a related JournalEntry object * * @param JournalEntry|PropelObjectCollection $journalEntry the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return JournalQuery 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(JournalPeer::ID, $journalEntry->getJournalId(), $comparison); } elseif ($journalEntry instanceof PropelObjectCollection) { return $this->useJournalEntryQuery()->filterByPrimaryKeys($journalEntry->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByJournalEntry() only accepts arguments of type JournalEntry or PropelCollection'); } }