예제 #1
0
 /**
  * Filter the query by a related \App\Models\Period object
  *
  * @param \App\Models\Period|ObjectCollection $period 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 ChildApplicationQuery The current query, for fluid interface
  */
 public function filterByPeriod($period, $comparison = null)
 {
     if ($period instanceof \App\Models\Period) {
         return $this->addUsingAlias(ApplicationTableMap::COL_PERIOD_ID, $period->getId(), $comparison);
     } elseif ($period instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ApplicationTableMap::COL_PERIOD_ID, $period->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPeriod() only accepts arguments of type \\App\\Models\\Period or Collection');
     }
 }