/** * Filter the query by a related \CyberdenBundle\Model\Station object * * @param \CyberdenBundle\Model\Station|ObjectCollection $station 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 ChildSessionQuery The current query, for fluid interface */ public function filterByStation($station, $comparison = null) { if ($station instanceof \CyberdenBundle\Model\Station) { return $this->addUsingAlias(SessionTableMap::COL_STATION_ID, $station->getId(), $comparison); } elseif ($station instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SessionTableMap::COL_STATION_ID, $station->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByStation() only accepts arguments of type \\CyberdenBundle\\Model\\Station or Collection'); } }