Example #1
0
 /**
  * Filter the query by a related \App\Models\Application object
  *
  * @param \App\Models\Application|ObjectCollection $application the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPeriodQuery The current query, for fluid interface
  */
 public function filterByApplication($application, $comparison = null)
 {
     if ($application instanceof \App\Models\Application) {
         return $this->addUsingAlias(PeriodTableMap::COL_ID, $application->getPeriodId(), $comparison);
     } elseif ($application instanceof ObjectCollection) {
         return $this->useApplicationQuery()->filterByPrimaryKeys($application->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByApplication() only accepts arguments of type \\App\\Models\\Application or Collection');
     }
 }