Example #1
0
 /**
  * Filter the query by a related \CyberdenBundle\Model\Session object
  *
  * @param \CyberdenBundle\Model\Session|ObjectCollection $session the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildStationQuery The current query, for fluid interface
  */
 public function filterBySession($session, $comparison = null)
 {
     if ($session instanceof \CyberdenBundle\Model\Session) {
         return $this->addUsingAlias(StationTableMap::COL_ID, $session->getStationId(), $comparison);
     } elseif ($session instanceof ObjectCollection) {
         return $this->useSessionQuery()->filterByPrimaryKeys($session->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySession() only accepts arguments of type \\CyberdenBundle\\Model\\Session or Collection');
     }
 }