Example #1
0
 /**
  * Filter the query by a related \App\Propel\UserPeriodicPlan object
  *
  * @param \App\Propel\UserPeriodicPlan|ObjectCollection $userPeriodicPlan the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPeriodicPlanQuery The current query, for fluid interface
  */
 public function filterByUserPeriodicPlan($userPeriodicPlan, $comparison = null)
 {
     if ($userPeriodicPlan instanceof \App\Propel\UserPeriodicPlan) {
         return $this->addUsingAlias(PeriodicPlanTableMap::COL_PERIODIC_PLAN_ID, $userPeriodicPlan->getPeriodicPlanId(), $comparison);
     } elseif ($userPeriodicPlan instanceof ObjectCollection) {
         return $this->useUserPeriodicPlanQuery()->filterByPrimaryKeys($userPeriodicPlan->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUserPeriodicPlan() only accepts arguments of type \\App\\Propel\\UserPeriodicPlan or Collection');
     }
 }